refactor(lsp): restructure lsp plugin controller architecture and simplify provider cache

- 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
This commit is contained in:
2026-03-11 23:15:19 -05:00
parent 3dfb198aa5
commit 52db0b8a31
20 changed files with 601 additions and 174 deletions

View File

@@ -9,6 +9,7 @@ from gi.repository import GtkSource
from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import Gio
from gi.repository import GLib
# Application imports
from ..command_helpers import update_info_bar_if_focused
@@ -35,6 +36,10 @@ def execute(
update_info_bar_if_focused(view.command, view)
view.emit("focus-in-event", Gdk.Event())
buffer = view.get_buffer()
itr = buffer.get_iter_at_mark( buffer.get_insert() )
view.scroll_to_iter(itr, 0.2, False, 0, 0)
def scroll_to_insert_itr(view):
buffer = view.get_buffer()
itr = buffer.get_iter_at_mark( buffer.get_insert() )
view.scroll_to_iter(itr, 0.2, False, 0, 0)
GLib.idle_add(scroll_to_insert_itr, view)