From 64c398871d56c20c57c7b294113ca45b7b03f3c5 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sun, 23 Apr 2023 15:46:05 +0200 Subject: [PATCH] feat: add clangd lsp --- modules/languages/clang.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/languages/clang.nix b/modules/languages/clang.nix index 39e5031..a779dd5 100644 --- a/modules/languages/clang.nix +++ b/modules/languages/clang.nix @@ -21,6 +21,17 @@ with builtins; let } ''; }; + clangd = { + package = pkgs.clang-tools; + lspConfig = '' + lspconfig.clangd.setup{ + capabilities = capabilities; + on_attach=default_on_attach; + cmd = {"${cfg.lsp.package}/bin/clangd"}; + ${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.opts}"} + } + ''; + }; }; in { options.vim.languages.clang = {