-
Notifications
You must be signed in to change notification settings - Fork 85
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
Multiple Definitions Returned #449
base: master
Are you sure you want to change the base?
Conversation
quickfixlist with the options to select. Selecting an option should be in terms of the replicated vim behaviour (my assumption). This _could_ be useful, if the langauge is lexical scoped. There should be only _one declaration_. Multiple _re_definitions could appear.
…ons. This branch is concerned with compability. It should: * enable jumping to (1) declaration => with split, only one binding * extend the existing documentation => reference parent impl * extend the existing tests => copy dart-test
I created a secondary branch, which introduces the old behaviour, but with the request of The user behaviour changes for the following: When one binding is provided, both bindings ( The complementary branch will enable the previous behavior on a differing binding called
|
If there is only a single item in an array, diretly chose this. If the result isn't an array, we can use it similiarly. Somehow, I incremented this check. This fixes it.
…ons. This branch is concerned with compability. It should: * enable jumping to (1) declaration => with split, only one binding * extend the existing documentation => reference parent impl * extend the existing tests => copy dart-test
@natebosch You can test the behaviour of my PR in unity at the following branch: https://github.com/thchha/vim-lsc/tree/thchha Please be aware that I am new to contributing. Just pinpoint the issues you have in your gut. |
…ons. This branch is concerned with compability. It should: * enable jumping to (1) declaration => with split, only one binding * extend the existing documentation => reference parent impl * extend the existing tests => copy dart-test
(Multiple Definitions Returned natebosch#449) natebosch#449 71181e0
@@ -3,6 +3,8 @@ if !exists('s:initialized') | |||
let s:default_maps = { | |||
\ 'GoToDefinition': '<C-]>', | |||
\ 'GoToDefinitionSplit': ['<C-W>]', '<C-W><C-]>'], | |||
\ 'GoToDeclaration': 'gd', | |||
\ 'GoToDeclarationSplit': ['<C-W>]', '<C-W>gd'], |
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.
I don't think we can map '<C-W>]'
again since it's mapped for GoToDefinitionSplit
\ 'GoToDeclarationSplit': ['<C-W>]', '<C-W>gd'], | |
\ 'GoToDeclarationSplit': ['<C-W>]', '<C-W>gd'], |
@@ -75,6 +76,15 @@ will default to opening a vertical split, while > | |||
< | |||
will prefer a new tab. | |||
|
|||
*:LSClientGoToDeclaration* | |||
Similiar to |LSClientGoToDefinition| but expects only a single result when |
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.
I don't think we should treat declarations specially since they allow multiple too.
What do you think about always jumping to the first element in the list for either case, but also populating the quickfix list with the extras when there are more?
…ons. This branch is concerned with compability. It should: * enable jumping to (1) declaration => with split, only one binding * extend the existing documentation => reference parent impl * extend the existing tests => copy dart-test
(Multiple Definitions Returned natebosch#449) natebosch#449 71181e0
…definitions." This reverts commit 46d3564.
Hey Mr. Bosch,
thank you for your efforts.
I am using your lsp-client implementation as a reference for my own language server since it is the most complaint one. Your code looks great. :)
This pull request requests your opinion on the prompted change.
I would appreciate mentoring in adapting the pull request to your needs, if the essence is acceptable.
Sincerly,
Thomas