Closed davidabram closed 1 month ago
You have correctly figured out that the first error comes due to Gleam being removed from Mason registry.
The problem you encounter if your second attempt is that gleam lsp can't find the root directory of your project. lspconfig looks for either gleam.toml
file or .git
dir (it does it while walking up the directory chain) and it seems that it can't find any. Try editing a gleam file in a git initialized directory, and I assume it will work.
Thanks @VlaDexa!
Setup like it's described here works in a dir where gleam.toml (for example, set up with gleam new) works properly.
Thank you for helping a skill issued colleague.
Describe the bug
I have a giant skill issue, I am unable to setup Gleam LSP. Gleam LSP was removed from Mason as it's directly distributed by Gleam installation. In docs lsp can be setup by
lspconfig.gleam.setup({})
as seen in docs here.To Reproduce
I have tried adding it into the servers variable in init.lua.
But when rerun nvim I get error:
I have also tried just adding
But the problem happens when I open a .gleam file and lsp doesn't attach to the buffer. Running `:LspInfo':
Desktop
Neovim Version