feat: improve code completion, terminal setup, and plugin events

Add interactive LSP completion with debounced requests and cancellation
Support C source files in Tree-sitter parsing and code folding
Fix search-and-replace selection handling
Improve split-pane expansion and terminal initialization
Configure custom Bash startup files and script paths
Update WebKit2 requirements to version 4.1
Unify application event registration and preserve controller message results
Rename the UI plugin exception and clean up event emission APIs
Refine 'code' plugin 'search' field limits and related widget behavior
This commit is contained in:
2026-10-13 16:21:34 -05:00
parent 0c3de1334a
commit 3d05a95c01
12 changed files with 28 additions and 26 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ def custom_except_hook(exc_type, exc_value, exc_traceback):
sys.__excepthook__(exc_type, exc_value, exc_traceback)
sys.__excepthook__(exc_type, exc_value, exc_traceback)
return
#
logger.error("Uncaught exception", exc_info = (exc_type, exc_value, exc_traceback))
#
sys.excepthook = custom_except_hook
+1 -1
View File
@@ -4,12 +4,12 @@
import argparse
import faulthandler
import traceback
from setproctitle import setproctitle
import tracemalloc
tracemalloc.start()
# Lib imports
from setproctitle import setproctitle
# Application imports
from __builtins__ import *
@@ -4,7 +4,6 @@
import gi
gi.require_version('GtkSource', '4')
from gi.repository import GLib
from gi.repository import GtkSource
# Application imports
+1 -1
View File
@@ -88,7 +88,7 @@ class VteWidget(Vte.Terminal):
self.spawn_async(
Vte.PtyFlags.DEFAULT,
settings_manager.path_manager.get_home_path(),
["/bin/bash"],
["/bin/bash", "--rcfile", f"{settings_manager.path_manager.get_home_path()}/.bashrc", "-i"],
env,
GLib.SpawnFlags.DEFAULT,
None, None, -1, None, None,
+1 -1
View File
@@ -5,7 +5,7 @@ import json
# Lib imports
import gi
gi.require_version('Gdk', '3.0')
gi.require_version('WebKit2', '4.0')
gi.require_version('WebKit2', '4.1')
from gi.repository import Gdk
from gi.repository import Gtk
from gi.repository import Gio
+3 -1
View File
@@ -37,8 +37,10 @@ class ControllerBase(Singleton, EmitDispatcher):
return self.controller_message_bus.message_to(name, event)
def message_to_selected(self, names: list[str], event: BaseEvent):
for name in names:
return [
self.controller_message_bus.message_to_selected(name, event)
for name in names
]
def register_controller(self, name: str, controller):
self.controller_message_bus.register_controller(name, controller)
+4 -3
View File
@@ -31,7 +31,7 @@ class EventFactory(Singleton):
event_type = self._class_name_to_event_type(name)
self._event_classes[event_type] = obj
Code_Event_Types.add_event_class(name, obj)
App_Event_Types.add_event_class(name, obj)
i += 1
logger.debug(f"Registered {i} event types:")
@@ -44,7 +44,7 @@ class EventFactory(Singleton):
event_type = self._class_name_to_event_type(name)
del self._event_classes[event_type]
Code_Event_Types.remove_event_class(name)
App_Event_Types.remove_event_class(name)
i += 1
logger.debug(f"Unregistered {i} event types:")
@@ -98,6 +98,7 @@ class EventNamespace:
Code_Event_Types = EventNamespace()
App_Event_Types = EventNamespace()
Code_Event_Types = App_Event_Types
Event_Factory = EventFactory()
@@ -2,7 +2,7 @@
# Lib imports
import gi
gi.require_version('WebKit2', '4.0')
gi.require_version('WebKit2', '4.1')
from gi.repository import WebKit2
# Application imports
+3 -3
View File
@@ -41,10 +41,10 @@ class PluginCode(PluginBase):
return self.plugin_context.request_ui_element(element_id)
def emit(self, event: BaseEvent):
return self.plugin_context.emit(event)
self.plugin_context.emit(event)
def emit_to(self, name: str, event: BaseEvent):
return self.plugin_context.emit_to(name, event)
self.plugin_context.emit_to(name, event)
def emit_to_selected(self, names: list[str], event: BaseEvent):
return self.plugin_context.emit_to_selected(names, event)
self.plugin_context.emit_to_selected(names, event)
+7 -7
View File
@@ -10,7 +10,7 @@ from .plugin_base import PluginBase
class PluginCodeException(Exception):
class PluginUIException(Exception):
...
@@ -23,22 +23,22 @@ class PluginUI(PluginBase):
def _controller_message(self, event: BaseEvent):
raise PluginCodeException("Plugin UI '_controller_message' must be overriden by Plugin")
raise PluginUIException("Plugin UI '_controller_message' must be overriden by Plugin")
def load(self):
raise PluginCodeException("Plugin UI 'load' must be overriden by Plugin")
raise PluginUIException("Plugin UI 'load' must be overriden by Plugin")
def run(self):
raise PluginCodeException("Plugin UI 'run' must be overriden by Plugin")
raise PluginUIException("Plugin UI 'run' must be overriden by Plugin")
def request_ui_element(self, element_id: str):
return self.plugin_context.request_ui_element(element_id)
def emit(self, event: BaseEvent):
return self.plugin_context.emit(event)
self.plugin_context.emit(event)
def emit_to(self, name: str, event: BaseEvent):
return self.plugin_context.emit_to(name, event)
self.plugin_context.emit_to(name, event)
def emit_to_selected(self, names: list[str], event: BaseEvent):
return self.plugin_context.emit_to_selected(names, event)
self.plugin_context.emit_to_selected(names, event)