Skip to content

Commit

Permalink
Add new command lsp-bridge-rust-reload-workspace.
Browse files Browse the repository at this point in the history
  • Loading branch information
manateelazycat committed Sep 22, 2024
1 parent 26b2178 commit 74f2e64
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/handler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ def handle_response(self, request_id, response):
from core.handler.inlay_hint import InlayHint # noqa: F401
from core.handler.semantic_tokens import SemanticTokens # noqa: F401
from core.handler.rust_expand_macro import RustExpandMacro # noqa: F401
from core.handler.rust_reload_workspace import RustReloadWorkspace # noqa: F401
from core.handler.workspace_diagnostics import WorkspaceDiagnostics # noqa: F401
13 changes: 13 additions & 0 deletions core/handler/rust_reload_workspace.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from core.handler import Handler
from core.utils import *

class RustReloadWorkspace(Handler):
name = "rust_reload_workspace"
method = "rust-analyzer/reloadWorkspace"
cancel_on_change = False

def process_request(self) -> dict:
return dict()

def process_response(self, response) -> None:
pass
4 changes: 4 additions & 0 deletions lsp-bridge-rust.el
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
(interactive)
(lsp-bridge-call-file-api "rust_expand_macro" (lsp-bridge--position)))

(defun lsp-bridge-rust-reload-workspace ()
(interactive)
(lsp-bridge-call-file-api "rust_reload_workspace"))

(provide 'lsp-bridge-rust)

;;; lsp-bridge-rust.el ends here

0 comments on commit 74f2e64

Please sign in to comment.