LuaLS / LuaLS/lua-language-server

Settings from client and .luarc.json not getting merged

Aberta
#2,483 1 comentário 0 reações 0 responsáveis Ver no GitHub

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?

NeoVim

Which OS are you using?

Linux

What is the issue affecting?

Other

Expected Behaviour

Global settings from the client and local settings from the .luarc.json file should get merged. In my case I have the following .luarc.json:

{
	"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
  	"workspace.ignoreDir": ["test/xdg"]
}

There is no workspace.ignoreDir setting in my client config.

Actual Behaviour

The settings from .luarc.json are not applied. I have to add the ignoreDir setting to my client configuration for it to do something.

Reproduction steps

N/A

Additional Notes

I am testing a Neovim plugin (HiPhish/rainbow-delimiters.nvim), and the test setup requires me to place a symlink to the plugin root directory inside on of its sub-directories (rainbow-delimiters). When the language server starts scanning the plugin directory it ends up running in circles. Adding this directory to the ingoreDir list stops the infinite loop and the language server can scan all files normally.

I cannot place all my settings inside the local .luarc.json because the settings for Neovim configuration and plugin development cannot be known ahead of time, they must be generated. I can place the workspace.ignoreDir setting in my own client configuration, but this won't help people who want to contribute to my plugin.

What I need is for the language server to merge both configurations into one. The order should be from least to most significant:

  1. client configuration
  2. local configuration
  3. custom configuration file (maybe?)
Log File

file_home_hiphish_.local_share_nvim_site_pack_my-plugins_start_rainbow-delimiters.nvim.log

service.log

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece rastreando como o language server carrega e combina as configurações do cliente com .luarc.json, com foco em workspace.ignoreDir. Use os logs anexados para confirmar qual configuração é aplicada e onde a combinação é interrompida. Considera-se concluído quando as configurações do cliente e locais seguem a precedência solicitada e um teste de regressão cobre workspace.ignoreDir de ambas as fontes.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
lua, neovim
Domínio
developer-experience, tooling
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.