neoconf.nvim
neoconf.nvim copied to clipboard
bug: Can not overwrite binary path for `clangd` using `clangd.path`
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.10.0-dev-2280+g43661a0ab-Homebrew
Operating system/version
macOS 14.4.1
Describe the bug
I have noticed that both .neoconf.json
and .vscode/settings.json
have no effect on the binary path that is used for clangd
.
This is probably the root cause of #40.
Steps To Reproduce
- Create an empty directory
mkdir /tmp/bug-no-path-overwrite && cd /tmp/bug-no-path-overwrite
- Create relavent files
echo '{"lspconfig":{"clangd.path":"foo/bar"}}' > .neoconf.json && mkdir .vscode && echo '{"clangd.path":"foo/bar"}' > .vscode/settings.json && touch main.c
- Write
repro.lua
- Run
nvim -u repro.lua -c LspInfo main.c
Expected Behavior
I would expect the clangd
to point to /foo/bar
instead it points to /usr/bin/clangd
.
Repro
-- 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",
"neovim/nvim-lspconfig"
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- setup neoconf
require("neoconf").setup({})
-- setup clangd
require("lspconfig").clangd.setup({})