Files
AstroConfig/lua/plugins/20-lsp.lua

28 lines
860 B
Lua

---@type LazySpec
return {
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = {
mappings = {
n = {
gh = {
function() require("clangd_extensions.switch_source_header").switch_source_header() end,
desc = "Switch to matching source or header file",
cond = "textDocument/switchSourceHeader",
},
},
},
---@diagnostic disable: missing-fields
config = {
clangd = {
filetypes = { "c", "cpp", "objc", "objcpp", "cuda" },
cmd = {
"clangd",
"--header-insertion=never", -- Disable auto includes
"--enable-config", -- Enable .clangd and clangd.yaml files
},
},
},
},
}