refactor(lsp): replace LSPManager with controller-based architecture
- Remove legacy LSPManager dialog implementation - Introduce LSPController as the central LSP entry point - Route UI interactions through lsp_controller.lsp_manager_ui - Move client lifecycle handling out of ProviderResponseCache - Simplify completion cache and matcher filtering - Improve LSP completion item parsing with safer fallbacks - Modernize typing (Python 3.10 union syntax) - Remove unused imports and dead code - Use GLib.idle_add for safe UI scrolling operations - Minor comment and spelling fixes
This commit is contained in:
31
plugins/code/ui/lsp_manager/handlers/base.py
Normal file
31
plugins/code/ui/lsp_manager/handlers/base.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# Python imports
|
||||
from abc import ABC
|
||||
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
|
||||
|
||||
|
||||
class BaseHandler:
|
||||
def __init__(self):
|
||||
self.context = None
|
||||
self.response_cache = None
|
||||
|
||||
|
||||
def set_context(self, context):
|
||||
self.context = context
|
||||
|
||||
def set_response_cache(self, response_cache):
|
||||
self.response_cache = response_cache
|
||||
|
||||
@property
|
||||
def emit(self):
|
||||
return self.context.emit
|
||||
|
||||
@property
|
||||
def emit_to(self):
|
||||
return self.context.emit_to
|
||||
|
||||
def handle(self, method: str, response, controller):
|
||||
pass
|
||||
Reference in New Issue
Block a user