Open Nizarll opened 3 weeks ago
Make sure to start neovim in the same directory you have your default.project.json
file. Also can you provide more information about the error? like the result of LuauLsp log
and the steps to reproduce the issue.
It seems like you are you using LazyVim. If that's the case, the setup should be really simple:
return {
{
"nvim-treesitter/nvim-treesitter",
opts = { ensure_installed = { "luau" } },
},
{
"neovim/nvim-lspconfig",
opts = {
-- make sure mason installs the server
servers = {
luau_lsp = {},
},
setup = {
luau_lsp = function()
return true -- avoid duplicate servers (calling `lspconfig.luau_lsp.setup`)
end,
},
},
},
{
"lopi-py/luau-lsp.nvim",
ft = "luau",
opts = {
-- your luau-lsp.nvim options
-- all the options you put in the config you sent are already the default so no need to duplicate them
},
},
}
the problem was from not starting neovim in the same directory as the default.project.json since i thought utils.find_root_directory function in the configuration find the default.project.json according to the directory
@Nizarll Oops I edited your comment by accident, I've reverted it back to the original. Someone commented a spam (and potentially virus) link so I deleted it and maybe I got distracted and edited your comment.
the problem was from not starting neovim in the same directory as the default.project.json since i thought utils.find_root_directory function in the configuration find the default.project.json according to the directory
It could be the problem, the root_directory
is only used for the server, not sourcemap generation. Try starting neovim in the same directory of the default.project.json
.
heres my luau_lsp.lua :