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:
@@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.presets.base.formatting;
|
||||
in
|
||||
{
|
||||
options.presets.base.formatting = {
|
||||
enable = lib.mkEnableOption "formatting";
|
||||
prettier = lib.mkEnableOption "prettier formatter";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
formattersByFt = lib.mkIf cfg.prettier {
|
||||
javascript = [ "prettierd" ];
|
||||
markdown = [ "prettierd" ];
|
||||
typescript = [ "prettierd" ];
|
||||
json = [ "prettierd" ];
|
||||
yaml = [ "prettierd" ];
|
||||
html = [ "prettierd" ];
|
||||
angular = [ "prettierd" ];
|
||||
css = [ "prettierd" ];
|
||||
scss = [ "prettierd" ];
|
||||
less = [ "prettierd" ];
|
||||
svelte = [ "prettierd" ];
|
||||
};
|
||||
};
|
||||
extraPackages = lib.mkIf cfg.prettier [ pkgs.prettierd ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user