nvim: add ccls (C) lsp
This commit is contained in:
parent
5e558ed273
commit
42ef7fa0a5
2 changed files with 23 additions and 3 deletions
|
@ -1,14 +1,12 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config.machine.pkgsets.cpp.pkgs = with pkgs; [
|
||||
bear
|
||||
clang
|
||||
cmake
|
||||
gcc
|
||||
global
|
||||
irony-server
|
||||
];
|
||||
}
|
||||
|
|
22
pkgsets/nvim/lsp/c.nix
Normal file
22
pkgsets/nvim/lsp/c.nix
Normal 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"} ;
|
||||
};
|
||||
}
|
||||
}
|
||||
''
|
Loading…
Reference in a new issue