neoconf.nvim
neoconf.nvim copied to clipboard
bug: nil root_dir
Did you check docs and existing issues?
- [X] I have read all the neoconf.nvim docs
- [X] I have searched the existing issues of neoconf.nvim
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
v0.9.5 Release
Operating system/version
Linux 6.6
Describe the bug
When starting a Slint LSP, I get the following error:
[lspconfig] unhandled error: ....local/share/nvim/lazy/neoconf.nvim/lua/neoconf/util.lua:54: attempt to call upvalue 'root_dir' (a nil value)
And the server isn't started.
Steps To Reproduce
- Install the server through Mason
- Open a Slint file
- If you don't have automatic filetype detection already, do
:se ft=slint
- If the LSP didn't try to start automatically, do
:LspStart
- You should see the error pop out.
Expected Behavior
The LSP starts without errors.
Repro
-- With this repro, the server still doesn't start but I don't get the error either...
-- My regular setup uses LazyVim. Should I open an issue there?
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
"folke/neoconf.nvim",
"williamboman/mason-lspconfig.nvim",
{
"williamboman/mason.nvim",
config = function()
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "slint_lsp" },
})
end,
},
"neovim/nvim-lspconfig",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
same issue here don't know how to resolve it
Same issue here also would love to know how to resolve it if either of you manage to find a solution.
same issue here, im using astronvim version: v3.43.4 and neoconf version 1.2.2 main commit f8947e9
https://github.com/folke/neoconf.nvim/blob/4ef6c6c5882e7e16209173fb8c47414202843384/lua/neoconf/util.lua#L51-L54
Im not familiar with lua, but should not be:
if initial_config.root_dir then
or
local root_dir = opts.root_dir
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.