diff options
author | Brahmajit Das <listout@listout.xyz> | 2025-06-11 19:34:40 +0530 |
---|---|---|
committer | Brahmajit Das <listout@listout.xyz> | 2025-06-11 19:34:40 +0530 |
commit | 3414cf25fd8f0290ece64790db85bc125075b929 (patch) | |
tree | 2acca2f992b617c4549300d93ca1322cb896e79b /after | |
parent | dea7a63999b920b8e5718c48578d22cfe51b3929 (diff) |
after: lsp: clangd: add clangd config
Signed-off-by: Brahmajit Das <listout@listout.xyz>
Diffstat (limited to 'after')
-rw-r--r-- | after/lsp/clangd.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/after/lsp/clangd.lua b/after/lsp/clangd.lua new file mode 100644 index 0000000..0372d3d --- /dev/null +++ b/after/lsp/clangd.lua @@ -0,0 +1,12 @@ +return { + -- Command and arguments to start the server. + cmd = { 'clangd' }, + -- Filetypes to automatically attach to. + filetypes = { 'c', 'cpp', 'h', 'hpp' }, + -- Sets the "root directory" to the parent directory of the file in the + -- current buffer that contains either a ".luarc.json" or a + -- ".luarc.jsonc" file. Files that share a root directory will reuse + -- the connection to the same LSP server. + -- Nested lists indicate equal priority, see |vim.lsp.Config|. + root_markers = { '.clangd', 'compile_commands.json' }, +} |