From 7c152cc388f54207129546e8780202c8a61ca28f Mon Sep 17 00:00:00 2001 From: pmcc Date: Mon, 5 Oct 2026 16:43:57 -0400 Subject: [PATCH] Update --- dot_config/nvim/lsp/clangd.lua | 22 ++++++++++++++++++++++ dot_config/nvim/lua/config/lsp.lua | 1 + 2 files changed, 23 insertions(+) create mode 100644 dot_config/nvim/lsp/clangd.lua diff --git a/dot_config/nvim/lsp/clangd.lua b/dot_config/nvim/lsp/clangd.lua new file mode 100644 index 0000000..65ebf8e --- /dev/null +++ b/dot_config/nvim/lsp/clangd.lua @@ -0,0 +1,22 @@ +return { + cmd = { "clangd" }, + filetypes = { + "c", "cpp", "objc", "objcpp", + "cuda", "proto", + }, + root_markers = { + ".clangd", + ".clang-tidy", + ".clang-format", + "compile_commands.json", + "compile_flags.txt", + "configure.ac", + "configure", + "config.h", + "Makefile", + ".git", + }, + capabilities = { + offsetEncoding = { "utf-16" }, + }, +} diff --git a/dot_config/nvim/lua/config/lsp.lua b/dot_config/nvim/lua/config/lsp.lua index f0584ea..5d72446 100644 --- a/dot_config/nvim/lua/config/lsp.lua +++ b/dot_config/nvim/lua/config/lsp.lua @@ -54,6 +54,7 @@ vim.api.nvim_create_autocmd("LspAttach", { vim.lsp.enable({ "lua_ls", "ols", + "clangd", }) -- Load Lsp on-demand, e.g: eslint is disable by default