add first proc doc
This commit is contained in:
@@ -10,6 +10,7 @@ from plugins.poco_plugin import commands
|
||||
from tools import checks, parser
|
||||
from pygls import server, uris
|
||||
from tools.completion_items import completion, remove_existing_items, remove_shared_keys
|
||||
from tools.proc_docs import build_proc_docs
|
||||
|
||||
|
||||
DIAGNOSTIC_SOURCE = "nx-post-support"
|
||||
@@ -24,6 +25,7 @@ class TclLanguageServer(server.LanguageServer):
|
||||
self.diagnostics = {}
|
||||
self.poco_completion: dict = {}
|
||||
self.proc_signatures: dict = {}
|
||||
self.proc_docs: dict = {}
|
||||
|
||||
def update_poco_completion_for_file(self, document: TextDocument):
|
||||
"""Update poco_completion for a specific file when it changes"""
|
||||
@@ -34,6 +36,8 @@ class TclLanguageServer(server.LanguageServer):
|
||||
del self.poco_completion[filepath]
|
||||
if filepath in self.proc_signatures:
|
||||
del self.proc_signatures[filepath]
|
||||
if filepath in self.proc_docs:
|
||||
del self.proc_docs[filepath]
|
||||
|
||||
# Parse and extract new completion items
|
||||
completion.reset()
|
||||
@@ -44,6 +48,7 @@ class TclLanguageServer(server.LanguageServer):
|
||||
self.poco_completion[filepath] = completion.custom_functions
|
||||
remove_shared_keys(self.proc_signatures, completion.proc_signatures)
|
||||
self.proc_signatures[filepath] = completion.proc_signatures
|
||||
self.proc_docs[filepath] = build_proc_docs(tree, document.source)
|
||||
except Exception as e:
|
||||
logging.debug(f"Error parsing {filepath}: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user