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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user