feat: support standard lsp method for handling source generated content#355
Conversation
5fd3334 to
67e3485
Compare
67e3485 to
afc7d9d
Compare
|
Guess we can wait until LSP 3.18 is officialy out |
|
If this method was upstreamed in neovim, would this let us delete this code entirely? |
|
Looks like it, since there is no roslyn specific code. Maybe it's better to try to upstream it right away instead of putting it in this plugin (altough this forces people on stable to wait for new neovim release). |
|
if its small changes, then its possible they would backport or i would feel more confortable vendoring the upstreamed code exactly |
|
Sounds good, I will create an issue in neovim repo then |
|
Actually there is currently roslyn specific check for buffer name EDIT: vim.api.nvim_create_autocmd("LspAttach", {
callback = function(ev)
local client = assert(vim.lsp.get_client_by_id(ev.data.client_id))
if not client:supports_method("workspace/textDocumentContent") then
return
end
local schemes = assert(vim.tbl_get(client.server_capabilities, "workspace", "textDocumentContent", "schemes")) |
|
Keeping as draft for now for people who need this |
023d2af to
40a505a
Compare
Starting with roslyn version
5.7.0-1.26217.5roslyn no longer uses custom lsp methods for handling source generated content.Official lsp methods from 3.18 version
workspace/textDocumentContentandworkspace/textDocumentContent/refreshshould be used.LSP Spec https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#workspace_textDocumentContent
Related: dotnet/roslyn#83119