fixing lsp manager calls and responses

This commit is contained in:
itdominator 2024-09-15 01:17:45 -05:00
parent ab74fdd811
commit 1ed502f799
3 changed files with 7 additions and 2 deletions

View File

@ -48,6 +48,8 @@ class EditorControllerMixin(KeyInputController, EditorEventsMixin):
keys = message.result.keys()
if "items" in keys:
self.handle_completion(message.result["items"])
if "result" in keys:
...
if isinstance(message, LSPResponseNotification):
if message.method == "textDocument/publshDiagnostics":

View File

@ -96,8 +96,8 @@ class SourceView(SourceViewControllerMixin, GtkSource.View):
buffer.connect('insert-text', self._insert_text)
buffer.connect('modified-changed', self._buffer_modified_changed)
def _show_completion(self):
event_system.emit("textDocument/completion", (self, ))
def _show_completion(self, source_view):
event_system.emit("textDocument/completion", (source_view, ))
def _subscribe_to_events(self):
...

View File

@ -24,6 +24,9 @@ class SourceViewControllerMixin(KeyInputController, SourceViewEvents):
def get_filetype(self):
return self._current_filetype
def get_version_id(self):
return self._version_id
def set_buffer_language(self, buffer, language = "python3"):
buffer.set_language( self._language_manager.get_language(language) )