mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
feat: nixvim refactor
This commit is contained in:
25
modules/home-manager/programs/nixvim/presets/languages/c.nix
Normal file
25
modules/home-manager/programs/nixvim/presets/languages/c.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.languages.c;
|
||||
in
|
||||
{
|
||||
options.presets.languages.c = {
|
||||
enable = lib.mkEnableOption "C/C++";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
conform-nvim.formattersByFt = {
|
||||
c = [ "clang-format" ];
|
||||
cpp = [ "clang-format" ];
|
||||
};
|
||||
lsp.servers.clangd = {
|
||||
enable = true;
|
||||
cmd = [
|
||||
"clangd"
|
||||
"--offset-encoding=utf-16"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user