feat!(nvim): Migrate to v0.11 built-in lsp configs

This commit is contained in:
js0ny 2025-04-02 20:09:30 +01:00
parent 4da1667c54
commit 9315c6e55d
16 changed files with 303 additions and 31 deletions

View file

@ -1,5 +1,30 @@
-- C/C++
-- Clangd requires compile_commands.json to work and the easiest way to generate it is to use CMake.
-- How to use clangd C/C++ LSP in any project: https://gist.github.com/Strus/042a92a00070a943053006bf46912ae9
return {
cmd = { "clangd", "--background-index" },
root_markers = { "compile_commands.json", "compile_flags.txt", ".clangd" },
cmd = {
"clangd",
"--clang-tidy",
"--header-insertion=iwyu",
"--completion-style=detailed",
"--function-arg-placeholders",
"--fallback-style=none",
},
filetypes = { "c", "cpp" },
root_markers = {
".clangd",
".clang-format",
"compile_commands.json",
"compile_flags.txt",
".git",
},
capabilities = {
textDocument = {
completion = {
editsNearCursor = true,
},
},
offsetEncoding = { "utf-8", "utf-16" },
},
}