Refactor LSP manager architecture and event + completion pipeline
- Replace legacy LSPManagerClient + LSPManagerUI with ClientManager and UIManager - Remove WebsocketClient in favor of unified Websocket implementation - Move LSP initialization config loading into centralized config module - Update LSPClient to support dynamic socket, improved init params, and doc version tracking - Introduce range-based didChange notifications and add implementation + references requests - Expand LSPClientEvents to support implementation/references and structured range edits - Simplify websocket response handling and normalize LSP response parsing flow - Decouple UI from LSP manager core; UI now emits address/port for client creation - Refactor completion provider pipeline: - Split TextChangedEvent into TextInsertedEvent and DeleteRangeEvent - Update ProviderResponseCacheBase and controller dispatch paths accordingly - Improve SourceBuffer and SourceFile event tracking with delete-range support - Update plugin system: - Centralize command/provider registration via helper methods - Add LSP commands: definition, references, implementation, toggle UI - Enhance response handlers to support references and implementation hooks - Improve Python LSP config (jedi completion, signatures, references enabled) - Fix minor GTK lifecycle and buffer signal handling issues - Clean up unused imports, dead code, and outdated JSON server configs
This commit is contained in:
@@ -99,7 +99,7 @@ class MarkdownPreview(Gtk.Popover, MarkdownPreviewMixin):
|
||||
def _tggle_preview_updates(self, widget):
|
||||
self.is_preview_paused = not self.is_preview_paused
|
||||
|
||||
def _handle_destroy(self):
|
||||
def _handle_destroy(self, widget):
|
||||
self.disconnect_by_func(self._handle_hide)
|
||||
self.disconnect_by_func(self._handle_show)
|
||||
self.disconnect_by_func(self._handle_destroy)
|
||||
|
||||
@@ -41,18 +41,14 @@ class Plugin(PluginCode):
|
||||
def load(self):
|
||||
separator_right = self.request_ui_element("separator-right")
|
||||
markdown_preview.set_relative_to(separator_right)
|
||||
|
||||
event = Event_Factory.create_event("register_command",
|
||||
command_name = "tggle_markdown_preview",
|
||||
command = Handler,
|
||||
binding_mode = "released",
|
||||
binding = "<Shift><Control>m"
|
||||
)
|
||||
|
||||
self.emit_to("source_views", event)
|
||||
self._manage_signals("register_command")
|
||||
|
||||
def unload(self):
|
||||
event = Event_Factory.create_event("unregister_command",
|
||||
self._manage_signals("unregister_command")
|
||||
markdown_preview.destroy()
|
||||
|
||||
def _manage_signals(self, action: str):
|
||||
event = Event_Factory.create_event(action,
|
||||
command_name = "tggle_markdown_preview",
|
||||
command = Handler,
|
||||
binding_mode = "released",
|
||||
@@ -61,8 +57,6 @@ class Plugin(PluginCode):
|
||||
|
||||
self.emit_to("source_views", event)
|
||||
|
||||
markdown_preview.destroy()
|
||||
|
||||
def run(self):
|
||||
...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user