diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-26 18:27:30 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-26 21:56:33 +0100 |
commit | 446f15d3b4b410fc7a9443a6bd010e8d1db735bd (patch) | |
tree | 2865d0161e04e97bac8f1e3dc89dcf9391330618 /pyGHDL/lsp/vhdl_ls.py | |
parent | ab3c672925cb214be9d732835e891557a511b173 (diff) | |
download | ghdl-446f15d3b4b410fc7a9443a6bd010e8d1db735bd.tar.gz ghdl-446f15d3b4b410fc7a9443a6bd010e8d1db735bd.tar.bz2 ghdl-446f15d3b4b410fc7a9443a6bd010e8d1db735bd.zip |
pyGHDL/lsp: update, handle hover
Diffstat (limited to 'pyGHDL/lsp/vhdl_ls.py')
-rw-r--r-- | pyGHDL/lsp/vhdl_ls.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pyGHDL/lsp/vhdl_ls.py b/pyGHDL/lsp/vhdl_ls.py index dea9542b9..01474f746 100644 --- a/pyGHDL/lsp/vhdl_ls.py +++ b/pyGHDL/lsp/vhdl_ls.py @@ -21,7 +21,7 @@ class VhdlLanguageServer(object): "textDocument/didChange": self.textDocument_didChange, "textDocument/didClose": self.textDocument_didClose, "textDocument/didSave": self.textDocument_didSave, - # 'textDocument/hover': self.hover, + "textDocument/hover": self.textDocument_hover, "textDocument/definition": self.textDocument_definition, "textDocument/documentSymbol": self.textDocument_documentSymbol, # 'textDocument/completion': self.completion, @@ -50,7 +50,7 @@ class VhdlLanguageServer(object): "change": lsp.TextDocumentSyncKind.INCREMENTAL, "save": {"includeText": True}, }, - "hoverProvider": False, + "hoverProvider": True, # 'completionProvider': False, # 'signatureHelpProvider': { # 'triggerCharacters': ['(', ','] @@ -125,6 +125,9 @@ class VhdlLanguageServer(object): self.lint(doc_uri) return res + def textDocument_hover(self, textDocument=None, position=None): + return self.workspace.hover(textDocument["uri"], position) + def m_workspace__did_change_configuration(self, _settings=None): for doc_uri in self.workspace.documents: self.lint(doc_uri) |