LuaLS / LuaLS/lua-language-server
Any changes to the file tree are ignored
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?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Annotations, Type Checking, Completion, Diagnostics/Syntax Checking, Hover
Expected Behaviour
When you make any changes to the workspace's file tree (e.g. add a new file, rename a file), LuaLS becomes aware of them.
Actual Behaviour
New/renamed files are only recognized so long as they are open in the editor and completely forgotten about once closed.
Reproduction steps
- Add a new file to your existing workspace with the following content:
---@class TestClass
local TestClass = {}
function TestClass.test()
end
return TestClass
- Save it and close the editor tab.
- Require this file into a local in some other, preexisting file.
- Observe that the local is of unknown type.
Additional Notes
Re-running diagnostics doesn't fix this. The only workaround I have found is to completely restart VSCode.
From my limited understanding of LuaLS code, I think it has something to do with cached files. And there is no way to discard and rebuild the cache without exiting VSCode that I could find.
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 rastreando cómo LuaLS gestiona los cambios del workspace file-tree y el ciclo de vida de cached-file implicado en el informe. Reproduce la secuencia proporcionada de add, save, close y require, y verifica después que diagnostics reconozca el archivo nuevo o renombrado una vez cerrado, sin reiniciar VS Code.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- lua, vscode
- Á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
- 42/100