34 lines
947 B
Lua
34 lines
947 B
Lua
---@type LazySpec
|
|
return {
|
|
"AstroNvim/astrolsp",
|
|
---@type AstroLSPOpts
|
|
opts = {
|
|
features = {
|
|
autoformat = false,
|
|
inlay_hints = true,
|
|
},
|
|
formatting = {
|
|
format_on_save = {
|
|
enabled = false,
|
|
},
|
|
timeout_ms = 1000,
|
|
},
|
|
mappings = {
|
|
n = {
|
|
gh = {
|
|
require("clangd_extensions.switch_source_header").switch_source_header,
|
|
desc = "Switch to matching source or header file",
|
|
cond = "textDocument/switchSourceHeader",
|
|
},
|
|
},
|
|
},
|
|
---@diagnostic disable: missing-fields
|
|
config = {
|
|
clangd = {
|
|
cmd = { "clangd", "--header-insertion=never" }, -- Disable auto includes
|
|
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' },
|
|
},
|
|
},
|
|
},
|
|
}
|