LuaLS / LuaLS/lua-language-server
Adding a new workspace folder breaks things
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Lua
- Estrellas
- 4.4k
- Forks
- 442
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
### How are you using the lua-language-server?
NeoVim
### Which OS are you using?
Windows
### What is the issue affecting?
Completion, Diagnostics/Syntax Checking, Hover, Libraries
### Expected Behaviour
Addding new workspace folders should not break anything.
### Actual Behaviour
Right now, adding a new workspace folder breaks two things, diagnostics and require statements:
- You can fix the diagnostic errors by hooking to the `workspace/diagnostic/refresh` handler to manually refresh it, but even then this is very unreliable and prone to not working:
https://github.com/neovim/nvim-lspconfig/issues/2366
- `require` statements that refers to modules in the new workspace folder also does not resolve correctly (hovering over the module string will display the byte length, instead of the resolved path). This means that completions from the required module will also be missing. So far I can't find any way to fix this without restarting neovim entirely.
Other LSP servers doesn't have this problem. Adding a new workspace folder should _just_ work without any additional steps.
### Reproduction steps
1. Initialize the LSP server with a root directory
2. Add a new workspace folder using `workspace/didChangeWorkspaceFolders`
3. Opening a file from that workspace folder results in diagnostic errors and modules not being resolved correctly
### Additional Notes
_No response_
### Log File
_No response_
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza reproduciendo la secuencia reportada: inicializa con un directorio raíz, envía workspace/didChangeWorkspaceFolders y abre un archivo en la carpeta añadida. Investiga cómo se comportan después workspace/diagnostic/refresh y la resolución de módulos require. Se considera terminado cuando los diagnósticos, las rutas mostradas al pasar el cursor y las compleciones funcionan en el nuevo workspace sin reiniciar Neovim ni depender de actualizaciones manuales.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- lua, neovim
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100