-
-
Notifications
You must be signed in to change notification settings - Fork 241
Description
First, nice job on the webview front end. Love it.
Today when trying to get LSP to work with Rust I found that LSP mode is enabled (e.g., for Rust via define-language-spec in init.lisp + rust-analyzer), the webview frontend becomes completely unresponsive — no keyboard input, mouse clicks, or tab switching work. The ncurses frontend works fine with the same configuration
I walked through in general and found:
- The editor thread is not blocked, I was able to make a heartbeat timer fires every 2 seconds normally if I add logging
- LSP initialization completes successfully (server starts, initialize/initialized handshake, textDocument/didOpen all succeed)
- Diagnostic notifications arrive and are processed correctly
- The problem is specific to the webview/jsonrpc frontend —
ncursesbuild worked fine
Reproduction, off of 15eb7c4
Add to ~/.lem/init.lisp:
(lem-lsp-mode/lsp-mode::define-language-spec
(rust-spec lem-rust-mode:rust-mode)
:language-id "rust"
:root-uri-patterns '("Cargo.toml")
:command '("rust-analyzer")
:install-command "rustup component add rust-analyzer"
:readme-url "https://github.com/rust-lang/rust-analyzer"
:connection-mode :stdio)Then: ./lem --frontend webview some-rust-file.rs
The editor opens but becomes immediately unresponsive -- e.g. I see tabs but clicking them doesn't change, can't enter minibuffer, document doesn't load. Removing the define-language-spec resolves the issue.
ncurses frontend is as I said not affected.