LuaLS / LuaLS/lua-language-server
How to apply different libraries to different files?
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Lua
- Estrelas
- 4.4k
- Forks
- 442
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
MacOS
What is the issue affecting?
Libraries
Expected Behaviour
Same variables refer to different definitions, depending on file
Actual Behaviour
Same variables do not refer to different definitions, depending on file
Reproduction steps
Create several libraries with different definitions for some global
Additional Notes
Hi!
This is a question and not a bug report. Imagine, that I have several lua files with global variable named SomeVar:
file1.lua
print(SomeVar.X)
file2.lua
print(SomeVar.Y)
and there are two different files with annotations:
addon1/library/annotations1.lua
---@class TSomeVar1
---@field X integer
SomeVar = {}
addon2/library/annotations2.lua
---@class TSomeVar2
---@field Y integer
SomeVar = {}
Is there any way to specify that for file "file1.lua" first library should be used, and for "file2.lua" second library should be used?
I think that similar question was referred in this issue https://github.com/LuaLS/lua-language-server/issues/119
But I cannot run many language servers, because number of files can grow very large
Log File
No response
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece lendo a issue relacionada #119 e comparando a discussão com os exemplos em file1.lua, file2.lua, addon1/library/annotations1.lua e addon2/library/annotations2.lua. Determine se o language server oferece suporte à seleção de bibliotecas diferentes por arquivo e identifique a área de configuração ou implementação envolvida. Considera-se concluído quando o comportamento por arquivo é compatível e documentado ou quando sua limitação é claramente explicada.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- lua
- Domínio
- devtools
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100