From 3414cf25fd8f0290ece64790db85bc125075b929 Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Wed, 11 Jun 2025 19:34:40 +0530 Subject: after: lsp: clangd: add clangd config Signed-off-by: Brahmajit Das --- after/lsp/clangd.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 after/lsp/clangd.lua (limited to 'after') 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' }, +} -- cgit v1.2.3