-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Add check for declaration and typeDefinition support in vim lsp server before making request
#12421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check for declaration and typeDefinition support in vim lsp server before making request
#12421
Conversation
teto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this incondtionnaly disables typeDefinition. You need to really check for support in runtime/lua/vim/lsp/protocol.lua|863 col 19| function protocol.resolve_capabilities(server_capabilities)
|
Oh I didn't realize! I'll look into it now. |
typeDefinition support in vim lsp serverdeclaration and typeDefinition support in vim lsp server before making request
|
This is working as expected for me now. This is ready for review. |
|
Thanks for the PR @kdheepak . Feel free to open another if you want to handle the more complicated parsing of the tables! |
|
Thank you! |
…lsp server before making `request` (neovim#12421) * Add check for typeDefinition support in vim lsp server * Check for typeDefinitionProvider in server * Check for declarationProvider in server * Add check for client support * Fix typo
…lsp server before making `request` (neovim#12421) * Add check for typeDefinition support in vim lsp server * Check for typeDefinitionProvider in server * Check for declarationProvider in server * Add check for client support * Fix typo
…lsp server before making `request` (neovim#12421) * Add check for typeDefinition support in vim lsp server * Check for typeDefinitionProvider in server * Check for declarationProvider in server * Add check for client support * Fix typo
This PR is required because LanguageServer.jl crashes when requesting
textDocument/typeDefinitionandtextDocument/declaration. LanguageServer.jl tells the client that it does not support this client and the client should not make this request. I've based this PR on the code fortextDocument/implementation, which does the right thing.