Skip to content

Commit

Permalink
style change
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Oct 2, 2024
1 parent 93ce8fd commit 4eb4390
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions plugin/core/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,19 +525,6 @@ def __init__(self) -> None:
self._windows: dict[int, WindowManager] = {}
client_configs.set_listener(self)

def on_client_config_updated(self, config_name: str | None = None) -> None:
for wm in self._windows.values():
wm.get_config_manager().update(config_name)

def on_userprefs_updated(self) -> None:
sublime.set_timeout_async(self._on_userprefs_updated_async)

def _on_userprefs_updated_async(self) -> None:
for wm in self._windows.values():
wm.on_diagnostics_updated()
for session in wm.get_sessions():
session.on_userprefs_changed_async()

def enable(self) -> None:
self._enabled = True
# Initialize manually at plugin_loaded as we'll miss out on "on_new_window_async" events.
Expand Down Expand Up @@ -576,6 +563,21 @@ def discard(self, window: sublime.Window) -> None:
if wm:
sublime.set_timeout_async(wm.destroy)

def _on_userprefs_updated_async(self) -> None:
for wm in self._windows.values():
wm.on_diagnostics_updated()
for session in wm.get_sessions():
session.on_userprefs_changed_async()

# --- Implements LspSettingsChangeListener -------------------------------------------------------------------------

def on_client_config_updated(self, config_name: str | None = None) -> None:
for wm in self._windows.values():
wm.get_config_manager().update(config_name)

def on_userprefs_updated(self) -> None:
sublime.set_timeout_async(self._on_userprefs_updated_async)


class RequestTimeTracker:
def __init__(self) -> None:
Expand Down

0 comments on commit 4eb4390

Please sign in to comment.