I'm using LazyVim as a bootstrap config.
On top of that I have very few changes. However, I'm not able to get lsp working for c++. LSP is working fine because it is working for Lua files. So, that leaves me suspecting my LSP config.
The behavior is that Neovim is using Visual Studio headers when I do go to definition. Whereas the project was compiled using mingw.
My init file:
-- init.lua
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
local nvim_lsp = require('lspconfig')
nvim_lsp.clangd.setup {
cmd = {'clangd', '--background-index', '--compile-commands-dir', 'D:/systemc/excersies/build'},
init_options = {
clangdFileStatus = true,
clangdSemanticHighlighting = true
},
filetypes = {'c', 'cpp', 'cxx', 'cc'},
root_dir = function() vim.fn.getcwd() end,
settings = {
['clangd'] = {
['compilationDatabasePath'] = 'build',
['fallbackFlags'] = {'-std=c++17'}
}
}
}