LSP does not restart on version upgrade

Abierto
#554 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
lua, neovim
Área
tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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:

  1. Make a temporary document with #version to query the LSP's Lean version (apparently there isn't really any easier way? Is there?)
  2. 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)
Lenguaje dominante
Lua
Estrellas
616
Forks
63
Merge medio
1 d 7 h
PR fusionados (30 d)
10

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Julian/lean.nvim

Todos los issues de Julian/lean.nvim

Issues similares

Más issues de Lua

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.