Lua lsp server can't initialize

Open
#2,356 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
46/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active

Research direction

Start by tracing Lem’s LSP initialization and stdio JSON-RPC request handling; the report identifies an invalid request on the lem-lsp-mode reader thread but names no source file or test. Reproduce by opening a Lua file with Lua-language-server 3.19.2 and capturing stderr as shown. Done means initialization completes without the invalid-request error and the LSP status bar no longer hangs.

Written by the indexing model from the issue text.

Description

The lsp status bar just hangs indefinitely when i open a lua file.

Image

Error reproduction:

~/.source/lem (main)
> lem /home/wurfkreuz/.dotfiles/nvim/lua/user/nvim-treesitter.lua 2>/tmp/lem-err.txt
~/.source/lem (main)
> cat /tmp/lem-err.txt

debugger invoked on a JSONRPC/ERRORS:JSONRPC-INVALID-REQUEST in thread #<THREAD tid=35223 "lem-lsp-mode/lem-stdio-transport reading" RUNNING {1205D63F93}>: Condition JSONRPC/ERRORS:JSONRPC-INVALID-REQUEST was signalled.

The current thread is not at the foreground,
SB-THREAD:RELEASE-FOREGROUND has to be called in #<SB-THREAD:THREAD tid=35099 "main thread" RUNNING {12042C0003}>
for this thread to enter the debugger.

Specs:
Lua-language-server: 3.19.2
Lem: c5c12149cb75
SBCL 2.6.9-1.fc44
Fedora 44, Linux 7.2.11-200.fc44.x86_64
Sway 1.11
SDL2_ttf 2.24.0, SDL2_image 2.8.12
SDL2 library: sdl2-compat-2.32.74-1.fc44.x86_64

Dominant language
Common Lisp
Stars
3.1k
Forks
261
Avg merge
1d 6h
Merged PRs (30d)
133

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lem-project/lem

All issues in lem-project/lem

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.