nvim: add ccls (C) lsp

This commit is contained in:
Kevin Baensch 2024-12-21 21:54:06 +01:00
parent 5e558ed273
commit 42ef7fa0a5
Signed by: derped
GPG key ID: C0F1D326C7626543
2 changed files with 23 additions and 3 deletions

View file

@ -1,14 +1,12 @@
{ {
config,
pkgs, pkgs,
... ...
}: }:
{ {
config.machine.pkgsets.cpp.pkgs = with pkgs; [ config.machine.pkgsets.cpp.pkgs = with pkgs; [
bear
clang clang
cmake cmake
gcc gcc
global
irony-server
]; ];
} }

22
pkgsets/nvim/lsp/c.nix Normal file
View file

@ -0,0 +1,22 @@
{
lib,
config,
pkgs,
...
}:
lib.optionalString (lib.elem "nvim::lsp::c" config.machine.pkgs) # lua
''
lspconfig.ccls.setup {
cmd = { "${pkgs.ccls}/bin/ccls" },
init_options = {
compilationDatabaseDirectory = "build";
index = {
threads = 0;
};
clang = {
excludeArgs = { "-frounding-math"} ;
};
}
}
''