Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Can not overwrite binary path for clangd using clangd.path #57

Open
3 tasks done
michaelvanstraten opened this issue May 6, 2024 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@michaelvanstraten
Copy link

Did you check docs and existing issues?

  • I have read all the neoconf.nvim docs
  • I have searched the existing issues of neoconf.nvim
  • 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

  1. Create an empty directorymkdir /tmp/bug-no-path-overwrite && cd /tmp/bug-no-path-overwrite
  2. Create relavent files echo '{"lspconfig":{"clangd.path":"foo/bar"}}' > .neoconf.json && mkdir .vscode && echo '{"clangd.path":"foo/bar"}' > .vscode/settings.json && touch main.c
  3. Write repro.lua
  4. 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({})
@michaelvanstraten michaelvanstraten added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant