Webview frontend becomes unresponsive when LSP mode is active
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by comparing the webview frontend’s JSON-RPC event handling with the ncurses frontend, using the Rust LSP setup and reproduction command in the issue. Check how diagnostic notifications and editor input are processed when LSP mode is active. The issue is resolved when the webview remains responsive with the provided configuration and the Rust document loads.
Written by the indexing model from the issue text.
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 15eb7c43c9f806028f3de6d3c7b1b6a338e4b7cd
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.
- Dominant language
- Common Lisp
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 133
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lem-project/lem
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
lem-project/lem#2525 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
lem-project/lem#2524 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lem-project/lem#2488 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lem-project/lem#2369 ·
Maintainers usually reply within 1 day
-
unix-paste-bugOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lem-project/lem#2360 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
mcpx scan: flag unsafe tool namesPossibly taken @zeyadbadawyy claimed this today. Openarea/scan enhancement good first issue priority/medium size/small
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rohitgollarahalli/mcpx#45 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
facebookresearch/atlas-lean#20218 ·
Maintainers usually reply within 1 day