diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-26 18:45:51 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-26 21:56:35 +0100 |
commit | 85fab1d4d93587643eed9d76bd9d601e3c563656 (patch) | |
tree | 311f62e2e556619d3fb70b93f7e1cf8161c3da53 /pyGHDL/lsp/vhdl_ls.py | |
parent | eb1a2fc862bfa3196978673cfb29dc00139deadd (diff) | |
download | ghdl-85fab1d4d93587643eed9d76bd9d601e3c563656.tar.gz ghdl-85fab1d4d93587643eed9d76bd9d601e3c563656.tar.bz2 ghdl-85fab1d4d93587643eed9d76bd9d601e3c563656.zip |
pyGHDL/lsp: add goto implementation
Diffstat (limited to 'pyGHDL/lsp/vhdl_ls.py')
-rw-r--r-- | pyGHDL/lsp/vhdl_ls.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pyGHDL/lsp/vhdl_ls.py b/pyGHDL/lsp/vhdl_ls.py index 9d5b71f59..bd6abcf41 100644 --- a/pyGHDL/lsp/vhdl_ls.py +++ b/pyGHDL/lsp/vhdl_ls.py @@ -24,6 +24,7 @@ class VhdlLanguageServer(object): "textDocument/didSave": self.textDocument_didSave, "textDocument/hover": self.textDocument_hover, "textDocument/definition": self.textDocument_definition, + "textDocument/implementation": self.textDocument_implementation, "textDocument/documentSymbol": self.textDocument_documentSymbol, # 'textDocument/completion': self.completion, "textDocument/rangeFormatting": self.textDocument_rangeFormatting, @@ -60,6 +61,7 @@ class VhdlLanguageServer(object): # 'triggerCharacters': ['(', ','] # }, "definitionProvider": True, + "implementationProvider": True, "referencesProvider": False, "documentHighlightProvider": False, "documentSymbolProvider": True, @@ -116,6 +118,9 @@ class VhdlLanguageServer(object): def textDocument_definition(self, textDocument=None, position=None): return self.workspace.goto_definition(textDocument["uri"], position) + def textDocument_implementation(self, textDocument=None, position=None): + return self.workspace.goto_implementation(textDocument["uri"], position) + def textDocument_documentSymbol(self, textDocument=None): doc = self.workspace.get_or_create_document(textDocument["uri"]) return doc.document_symbols() |