diff options
author | Squibid <me@zacharyscheiman.com> | 2025-05-08 18:18:34 -0500 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2025-05-08 18:18:34 -0500 |
commit | 7430ebed8eab0364452a6cdcaa209f8a7288e44d (patch) | |
tree | cd80b99c41c4af92c7a130fe52ca462062697d22 /after/lsp/clangd.lua | |
parent | 7c3289fded1f75f6e060f56bd06edc2a327744d9 (diff) | |
download | nvim-3.0.tar.gz nvim-3.0.tar.bz2 nvim-3.0.zip |
kitchen sink now don't support any version lower than 0.11.0 for lspv3.0
- dap now works for java and c
Diffstat (limited to 'after/lsp/clangd.lua')
-rw-r--r-- | after/lsp/clangd.lua | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/after/lsp/clangd.lua b/after/lsp/clangd.lua new file mode 100644 index 0000000..b1919c8 --- /dev/null +++ b/after/lsp/clangd.lua @@ -0,0 +1,27 @@ +local map = require("core.misc").map + +return { + on_attach = function(_, bufnr) + -- add some clangd specific mappings + local opts = { buffer = bufnr } + map("n", "<leader>o", "<cmd>ClangdSwitchSourceHeader<CR>", opts) + end, + + cmd = { + "clangd", + "--background-index", + "--clang-tidy", + "--header-insertion=iwyu", + "--completion-style=detailed", + "--function-arg-placeholders", + "--fallback-style=llvm" + }, + + init_options = { + usePlaceholders = true, + clangdFileStatus = true, + fallback_flags = { + "-xc" -- makes clangd think we"re using c instead of c++ + } + } +} |