Fix/improve declaration handling in lsp-ui-*find-*references #759
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request contains a bugfix and a small improvement.
Last year,
lsp--make-reference-params
had its parameter reversed in emacs-lsp/lsp-mode@2c6a0e92, but no matching change was made here, so the behavior of a few functions became incorrect. The first commit in this pull request fixes those functions.lsp-ui-peek-find-references
, I left the argument name intact and reversed the value, which restores the previous behavior of not including the declaration by default. This allowslsp-ui-peek-always-show
to work normally when trying to navigate from a definition to the only usage of the identifier.lsp-ui-find-{next,prev}-reference
, I changed the name of the argument toexclude-declaration
, which leaves the previous behavior intact (they include the declaration).The second commit adds a prefix argument to
lsp-ui-peek-find-references
, allowing a prefix argument to be given to include the declaration in the search, just in case you want to see the definition and references at the same time.