mirror of
https://github.com/youwen5/neovim-flake.git
synced 2024-11-24 19:03:49 -08:00
formatters: add for common languages
This commit is contained in:
parent
1b5e491ac9
commit
91c08532a1
1 changed files with 12 additions and 5 deletions
|
@ -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"];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue