LSP does not restart on version upgrade
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by tracing the Neovim LSP lifecycle around the vim.lsp.enable('leanls', false) and vim.lsp.enable('leanls') entry points described in the issue. Determine how a Lean version upgrade can be detected and when the language server should restart, including the version-check race described in the proposed approaches. Done means upgrades restart the LSP automatically without requiring the manual workaround.
Written by the indexing model from the issue text.
Description
As in the title. This leads to a non-negligible number of headaches, including but not limited to unnecessary rebuild and seemingly corrupted files.
Workaround: A manual way to restart the language server is
:lua vim.lsp.enable('leanls', false); vim.lsp.enable('leanls')
Two ways this can be fixed I can think of:
- Make a temporary document with
#versionto query the LSP's Lean version (apparently there isn't really any easier way? Is there?) - Do something like a seqlock, query the LSP's version before and after launching it, while they disagree then restart the LSP (disproportionately unlikely), if they agree then take that as the version, and restart when version increases (reason: avoid race condition)
- Dominant language
- Lua
- Stars
- 597
- Forks
- 60
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- No 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 Julian/lean.nvim
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in Julian/lean.nvim
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jellyfin/jellyfin-mpv-shim#800 ·
Maintainers usually reply within 1 day
-
agent-research-finding bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jordansmall/nixvim-config#99 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
xmake-io/xmake#7822 · 3 comments ·
Maintainers usually reply within 2 days
-
bug(extras): kulala.nvim 6.0.0 has gone partially private / license change.Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
LazyVim/LazyVim#7270 · 3 comments ·
Maintainers usually reply within 2 days