aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src
diff options
context:
space:
mode:
authorVitalii Solodilov2023-04-27 14:30:15 +0000
committerGitHub2023-04-27 14:30:15 +0000
commit2836ea2ac40bd54ec1b00ffcd5927cdb4b7724d3 (patch)
tree0fdc72cc6ac4f82f67b160f0b3cbabe4cbdb862d /helix-lsp/src
parent222be0f1e769177241eb2d8d8dfb0de42e450820 (diff)
feat: add a config option to exclude declaration from LSP references (#6886)
* feat: added the config option to exclude declaration from reference query Fixes: #5344 * fix: review * fix: review
Diffstat (limited to 'helix-lsp/src')
-rw-r--r--helix-lsp/src/client.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index 93e822c4..89b714e2 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -1167,6 +1167,7 @@ impl Client {
&self,
text_document: lsp::TextDocumentIdentifier,
position: lsp::Position,
+ include_declaration: bool,
work_done_token: Option<lsp::ProgressToken>,
) -> Option<impl Future<Output = Result<Value>>> {
let capabilities = self.capabilities.get().unwrap();
@@ -1183,7 +1184,7 @@ impl Client {
position,
},
context: lsp::ReferenceContext {
- include_declaration: true,
+ include_declaration,
},
work_done_progress_params: lsp::WorkDoneProgressParams { work_done_token },
partial_result_params: lsp::PartialResultParams {