From ba83834416b8980148d115cd275c181deda10471 Mon Sep 17 00:00:00 2001 From: gnikit Date: Fri, 13 May 2022 09:52:13 +0100 Subject: [PATCH] Added `textDocument/documentHighlight` Fixes Feature request: documentHighlightProvider support #43 --- CHANGELOG.md | 7 +++++++ README.md | 33 +++++++++++++++++---------------- fortls/langserver.py | 1 + 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2854a6c..3178829f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +## 2.5.0 + +### Added + +- Added `textDocument/documentHighlight` request for Vim and EMACS + ([#43](https://github.com/gnikit/fortls/issues/43)) + ## 2.4.0 ### Added diff --git a/README.md b/README.md index da42b780..ebf1d301 100644 --- a/README.md +++ b/README.md @@ -137,22 +137,23 @@ An example for a Configuration file is given below ## Implemented server requests -| Request | Description | -| ----------------------------- | ------------------------------------------------------ | -| `workspace/symbol` | Get workspace-wide symbols | -| `textDocument/documentSymbol` | Get document symbols e.g. functions, subroutines, etc. | -| `textDocument/completion` | Suggested tab-completion when typing | -| `textDocument/signatureHelp` | Get signature information at a given cursor position | -| `textDocument/definition` | GoTo definition/Peek definition | -| `textDocument/references` | Find all/Peek references | -| `textDocument/hover` | Show messages and signatures upon hover | -| `textDocument/implementation` | GoTo implementation/Peek implementation | -| `textDocument/rename` | Rename a symbol across the workspace | -| `textDocument/didOpen` | Document synchronisation upon opening | -| `textDocument/didSave` | Document synchronisation upon saving | -| `textDocument/didClose` | Document synchronisation upon closing | -| `textDocument/didChange` | Document synchronisation upon changes to the document | -| `textDocument/codeAction` | **Experimental** Generate code | +| Request | Description | +| -------------------------------- | ------------------------------------------------------ | +| `workspace/symbol` | Get workspace-wide symbols | +| `textDocument/documentSymbol` | Get document symbols e.g. functions, subroutines, etc. | +| `textDocument/completion` | Suggested tab-completion when typing | +| `textDocument/signatureHelp` | Get signature information at a given cursor position | +| `textDocument/definition` | GoTo definition/Peek definition | +| `textDocument/references` | Find all/Peek references | +| `textDocument/documentHighlight` | Same as `textDocument/references` | +| `textDocument/hover` | Show messages and signatures upon hover | +| `textDocument/implementation` | GoTo implementation/Peek implementation | +| `textDocument/rename` | Rename a symbol across the workspace | +| `textDocument/didOpen` | Document synchronisation upon opening | +| `textDocument/didSave` | Document synchronisation upon saving | +| `textDocument/didClose` | Document synchronisation upon closing | +| `textDocument/didChange` | Document synchronisation upon changes to the document | +| `textDocument/codeAction` | **Experimental** Generate code | ## Acknowledgements diff --git a/fortls/langserver.py b/fortls/langserver.py index d360f8ff..c1aa3c40 100644 --- a/fortls/langserver.py +++ b/fortls/langserver.py @@ -136,6 +136,7 @@ def noop(request: dict): "textDocument/signatureHelp": self.serve_signature, "textDocument/definition": self.serve_definition, "textDocument/references": self.serve_references, + "textDocument/documentHighlight": self.serve_references, "textDocument/hover": self.serve_hover, "textDocument/implementation": self.serve_implementation, "textDocument/rename": self.serve_rename,