Skip to content

Conversation

@kdheepak
Copy link
Contributor

@kdheepak kdheepak commented Jun 2, 2020

This PR is required because LanguageServer.jl crashes when requesting textDocument/typeDefinition and textDocument/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 for textDocument/implementation, which does the right thing.

Copy link
Member

@teto teto left a 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)

@kdheepak
Copy link
Contributor Author

kdheepak commented Jun 2, 2020

Oh I didn't realize! I'll look into it now.

@kdheepak kdheepak changed the title Add check for typeDefinition support in vim lsp server Add check for declaration and typeDefinition support in vim lsp server before making request Jun 2, 2020
@kdheepak
Copy link
Contributor Author

kdheepak commented Jun 2, 2020

This is working as expected for me now. This is ready for review.

@tjdevries tjdevries merged commit 6f4f38c into neovim:master Jun 4, 2020
@tjdevries
Copy link
Contributor

Thanks for the PR @kdheepak . Feel free to open another if you want to handle the more complicated parsing of the tables!

@kdheepak kdheepak deleted the kd/add-check-for-typeDefinition-in-vim-lsp branch June 4, 2020 15:43
@kdheepak
Copy link
Contributor Author

kdheepak commented Jun 4, 2020

Thank you!

weilbith added a commit to weilbith/nvim-lsp-bacomp that referenced this pull request Jun 18, 2020
farisachugthai pushed a commit to farisachugthai/neovim that referenced this pull request Aug 4, 2020
…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
h-michael pushed a commit to h-michael/neovim that referenced this pull request Aug 24, 2020
…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
landerlo pushed a commit to landerlo/neovim that referenced this pull request Nov 23, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants