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