This commit is contained in:
Tim Gröger 2026-05-21 12:00:21 +02:00
parent 7ff3f7b450
commit b816bbed49
1 changed files with 18 additions and 0 deletions

View File

@ -43,6 +43,24 @@ return {
-- client specific configuration can also go in `lsp/` in your configuration root (see `:h lsp-config`)
config = {
-- ["*"] = { capabilities = {} }, -- modify default LSP client settings such as capabilities
clangd = {
-- Wichtig für C/C++ Entwickler (behebt oft Codierungskonflikte)
capabilities = {
offsetEncoding = "utf-8",
},
-- Hier sagen wir dem LSP, wonach er suchen soll, um das QMK-Hauptverzeichnis zu finden
root_dir = function(filename)
local util = require "lspconfig.util"
return util.root_pattern("compile_commands.json", ".git")(filename)
end,
-- Optionale Optimierungen für clangd
cmd = {
"clangd",
"--background-index",
"--clang-tidy",
"--header-insertion=never", -- Verhindert, dass clangd ungewollt Header automatisch inkludiert
},
},
},
-- customize how language servers are attached
handlers = {