mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-06 16:19:07 -04:00
Compare commits
2 commits
8b9614bf0c
...
32f763ed4c
Author | SHA1 | Date | |
---|---|---|---|
|
32f763ed4c | ||
|
f3faf4b993 |
1 changed files with 10 additions and 1 deletions
|
@ -118,6 +118,7 @@ class LanguageServer:
|
|||
self.client_capabilities = {}
|
||||
self.client_supports_completion_choice = False
|
||||
self._open_files: T.Dict[str, OpenFile] = {}
|
||||
self._exited = False
|
||||
|
||||
def run(self):
|
||||
# Read <doc> tags from gir files. During normal compilation these are
|
||||
|
@ -125,7 +126,7 @@ class LanguageServer:
|
|||
xml_reader.PARSE_GIR.add("doc")
|
||||
|
||||
try:
|
||||
while True:
|
||||
while not self._exited:
|
||||
line = ""
|
||||
content_len = -1
|
||||
while content_len == -1 or (line != "\n" and line != "\r\n"):
|
||||
|
@ -221,6 +222,14 @@ class LanguageServer:
|
|||
},
|
||||
)
|
||||
|
||||
@command("shutdown")
|
||||
def shutdown(self, id, params):
|
||||
self._send_response(id, None)
|
||||
|
||||
@command("exit")
|
||||
def exit(self, id, params):
|
||||
self._exited = True
|
||||
|
||||
@command("textDocument/didOpen")
|
||||
def didOpen(self, id, params):
|
||||
doc = params.get("textDocument")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue