LuaLS / LuaLS/lua-language-server
Formatting is not working
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?
Linux
What is the issue affecting?
Formatting
Expected Behaviour
The document gets formatted.
Actual Behaviour
I get [LSP] Format request failed, no matching language servers. logged. Formatters for other lsps are working. :LspInfo shows lua_ls is running.
Reproduction steps
- I installed
lua-language-server3.6.22 via nix - Here is my
lspconfig:
require'lspconfig'.lua_ls.setup{
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
format = {
enable = true,
defaultConfig = {
indent_style = "tab",
},
},
},
},
}
Additional Notes
:LspInfo:
Press q or <Esc> to close this window. Press <Tab> to view server doc.
Language client log: /home/marcel/.local/state/nvim/lsp.log
Detected filetype: lua
0 client(s) attached to this buffer:
Other clients that match the filetype: lua
Config: lua_ls
filetypes: lua
root directory: /home/marcel/.dotfiles
cmd: /nix/var/nix/profiles/default/bin/lua-language-server
cmd is executable: true
autostart: true
custom handlers:
Configured servers list: phpactor, tsserver, lua_ls, ccls, elmls, rust_analyzer, pyright, vuels, texlab
Log File
[START][2023-02-22 23:00:05] LSP logging initiated
[INFO][2023-02-22 23:01:41] .../lua/vim/lsp.lua:1392 "exit_handler" {}
[START][2023-02-22 23:01:42] LSP logging initiated
[START][2023-02-22 23:03:42] LSP logging initiated
[START][2023-02-22 23:04:00] LSP logging initiated
[START][2023-02-22 23:05:11] LSP logging initiated
[START][2023-02-22 23:06:26] LSP logging initiated
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 el fallo en NeoVim con la configuración mostrada de lspconfig.lua_ls.setup y, a continuación, inspecciona :LspInfo y el archivo referenciado /home/marcel/.local/state/nvim/lsp.log. Se considera terminado cuando un búfer de Lua se conecta a lua_ls y una solicitud de formateo se ejecuta correctamente sin el error “no matching language servers”.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- lua, neovim
- Área
- developer-experience, tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100