development settings, and renaming neovim to nixvim
This commit is contained in:
37
home/modules/devtools/nixvim/plugins/conform.nix
Normal file
37
home/modules/devtools/nixvim/plugins/conform.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.modules.devtools.nixvim.plugins.conform-nvim;
|
||||
in {
|
||||
options = {
|
||||
modules.devtools.nixvim.plugins.conform-nvim.enable = mkEnableOption "Enables Conform plugin for nixvim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
formatOnSave = {
|
||||
lspFallback = true;
|
||||
timeoutMs = 500;
|
||||
};
|
||||
notifyOnError = true;
|
||||
formattersByFt = {
|
||||
liquidsoap = ["liquidsoap-prettier"];
|
||||
html = [["prettierd" "prettier"]];
|
||||
css = [["prettierd" "prettier"]];
|
||||
javascript = [["prettierd" "prettier"]];
|
||||
javascriptreact = [["prettierd" "prettier"]];
|
||||
typescript = [["prettierd" "prettier"]];
|
||||
typescriptreact = [["prettierd" "prettier"]];
|
||||
python = ["black"];
|
||||
lua = ["stylua"];
|
||||
nix = ["alejandra"];
|
||||
markdown = [["prettierd" "prettier"]];
|
||||
yaml = ["yamllint" "yamlfmt"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user