T
Termux11mo ago
RandomGuy

mason-lspconfig.nvim: failed to install lua_ls

So, a few days ago, i install NeoViM with LazyNViM, everything was right, until this message show up, it just annoying to see this everytime i edit a file, i heard that lua_ls does not support Android, but AT LEAST the error message is gone, not fully resolved, how?
No description
20 Replies
fisher
fisher11mo ago
dont use mason, install servers manually
Biswa96
Biswa9611mo ago
could you provide the reason why it does not work? Just curious if it is possible to fix.
fisher
fisher11mo ago
i tried looking into it, it uses purl to install stuff you could fork the mason registry repo to add stuff thats termux compatible here's lua-ls pkg for example https://github.com/mason-org/mason-registry/blob/main/packages/lua-language-server/package.yaml
GitHub
mason-registry/packages/lua-language-server/package.yaml at main · ...
Core registry for mason.nvim. Contribute to mason-org/mason-registry development by creating an account on GitHub.
fisher
fisher11mo ago
looks like lua-ls doesnt relese bionic+arm64 binaries on github, thats why it doesnt work
RandomGuy
RandomGuyOP11mo ago
when i check the log using :MasonLog, it says something like "lua-language-server, stylua, shfmt, The current platform is unsupported" also i try to install lua-language-server manually using pkg, the issue still persist somehow
RandomGuy
RandomGuyOP11mo ago
No description
fisher
fisher11mo ago
installing manually doesnt mean itll work in mason but itll work in lspconfig now
RandomGuy
RandomGuyOP11mo ago
Then, the thing is, the error message still show up, how to hide it at least?
fisher
fisher11mo ago
remove lua-language-server from auto install
RandomGuy
RandomGuyOP11mo ago
how?
fisher
fisher11mo ago
idk, check mason-lspconfig config
RandomGuy
RandomGuyOP11mo ago
where is the mason-lspconfig config file? couldn't find it in .config/nvim
Catinette
Catinette11mo ago
Google can help you
fisher
fisher11mo ago
this is why i hate nvim distros :tuxwtf: do :Telescope live_grep or :Telescope find_files to search for it
RandomGuy
RandomGuyOP11mo ago
what is the name of the configuration file? init.lua or something like that?
fisher
fisher11mo ago
again i have no idea, it could be anything
Juhan
Juhan11mo ago
grep -r mason
RandomGuy
RandomGuyOP11mo ago
I managed to disable mason and mason-lspconfig, it's actually pretty easy, just add disabled.lua in ~/.config/nvim/lua/plugins/, and add return statement that disable both of mason and mason-lspconfig, which i found somewhere in GitHub issue
dotsilva
dotsilva2mo ago
Leaving the code here to people just copy paste it (i got it with Gemini, it worked for me)
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
lua_ls = {
mason = false,
},
},
},
}
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
lua_ls = {
mason = false,
},
},
},
}
Computerph1
Computerph12mo ago
pkg i lua-language-server, and in lspconfig.lua, add lua_ls to lsp's list :P (Also, Mason only has x86 packages, so it fails in Termux since most of devices running it are ARM.)

Did you find this page helpful?