users/foo-dogsquared/programs/nixvim: add formatters settings

Setting up formatters for individual NixVim users is preferential so we leave
it alone.
This commit is contained in:
Gabriel Arazas 2024-02-14 18:57:01 +08:00
parent 881af63a03
commit 8c62b4f501
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -1,8 +1,26 @@
# NixVim config for some light software development. This is where language
# support plugins mainly reside.
{ config, pkgs, ... }:
# support plugins mainly reside. Also formatters.
{ config, pkgs, lib, ... }:
{
# Confirming these files are conforming.
plugins.conform-nvim = {
enable = true;
formatters = rec {
bash = [ "shfmt" ];
c = lib.singleton [ "clang_format" ];
cpp = c;
javascript = lib.singleton [ "prettierd" "prettier" ];
lua = [ "stylua" ];
nix = lib.singleton [ "nixpkgs-fmt" "alejandra" ];
python = [ "isort" "black" ];
ruby = lib.singleton [ "rubocop" "rufo" ];
typescript = javascript;
typst = [ "typstfmt" ];
};
};
# Give language "support" through tree-sitter.
plugins.treesitter.grammarPackages =
with config.plugins.treesitter.package.builtGrammars; [
agda