formatters: add for common languages

This commit is contained in:
Youwen Wu 2024-09-02 18:25:15 -07:00
parent 1b5e491ac9
commit 91c08532a1
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -1,14 +1,14 @@
# Code formatters
{pkgs, ...}: {
extraPackages = with pkgs; [
# TS/JS
# TS/JS, Markdown, TOML, JSON, etc
nodePackages.prettier
# Rust
rustfmt
# Nix
alejandra
nixfmt-rfc-style
# Python
black
@ -20,7 +20,7 @@
haskellPackages.fourmolu
# Misc
codespell
# codespell
];
plugins.conform-nvim = {
@ -33,11 +33,18 @@
formatters_by_ft = {
lua = ["stylua"];
python = ["black"];
nix = ["alejandra"];
nix = ["nixfmt"];
svelte = ["prettier"];
rust = ["rustfmt"];
haskell = ["fourmolu"];
"*" = ["codespell"];
toml = ["prettier"];
json = ["prettier"];
markdown = ["prettier"];
yaml = ["prettier"];
html = ["prettier"];
javascript = ["prettier"];
typescript = ["prettier"];
# "*" = ["codespell"];
"_" = ["trim_whitespace"];
};
};