- Replace LSPManager usage with LSPController integration - Move UI access through lsp_controller.lsp_manager_ui - Remove legacy ProviderResponseCache client management - Simplify completion filtering and matcher handling - Improve typing annotations and modernize union syntax - Clean up unused imports and dead code - Fix completion item parsing for insertText/textEdit fallbacks - Add async-safe scrolling via GLib.idle_add
29 lines
781 B
Python
29 lines
781 B
Python
# Python imports
|
|
from concurrent.futures import ThreadPoolExecutor
|
|
|
|
# Lib imports
|
|
import gi
|
|
gi.require_version('GtkSource', '4')
|
|
|
|
from gi.repository import GtkSource
|
|
|
|
# Application imports
|
|
from libs.dto.code.lsp.lsp_message_structs import LSPResponseTypes, LSPResponseRequest, LSPResponseNotification
|
|
|
|
from core.widgets.code.completion_providers.provider_response_cache_base import ProviderResponseCacheBase
|
|
|
|
|
|
|
|
class ProviderResponseCache(ProviderResponseCacheBase):
|
|
def __init__(self):
|
|
super(ProviderResponseCache, self).__init__()
|
|
|
|
self.matchers: dict = {}
|
|
|
|
|
|
def filter(self, word: str) -> list[dict]:
|
|
return []
|
|
|
|
def filter_with_context(self, context: GtkSource.CompletionContext) -> list[dict]:
|
|
return list( self.matchers.values() )
|