devos/users/modules/neovim/clangd.nix

19 lines
391 B
Nix
Raw Normal View History

2022-08-28 01:03:01 +02:00
{ lib, pkgs, config, ... }:
let
cfg = config.mae.nvim.clangd;
in
with lib;
{
options.mae.nvim.clangd.enable = lib.mkEnableOption "Enable C/C++ language support(with clangd) in neovim";
config = mkIf cfg.enable {
mae.nvim.lsp.servers.clangd = {
enable = true;
script = ''
{
cmd = { "${pkgs.clang-tools}/bin/clangd" },
}
'';
};
};
}