feat(nix): add formatting for Nix files

This commit is contained in:
Stefan Imhoff
2024-06-07 17:32:19 +02:00
parent adf23ccf02
commit 78b5cf28a9
4 changed files with 10 additions and 0 deletions

View File

@@ -34,6 +34,10 @@ set PATH ~/.dotfiles/private/bin $PATH
set PATH ~/.local/bin $PATH
set PATH ~/.asdf/shims $PATH
set -x LIBRARY_PATH (brew --prefix)/opt/libiconv/lib
set -x CPATH (brew --prefix)/opt/libiconv/include
set -x PKG_CONFIG_PATH (brew --prefix)/opt/libiconv/lib/pkgconfig
# Homebrew Command Not Found
set HB_CNF_HANDLER (brew --repository)"/Library/Taps/homebrew/homebrew-command-not-found/handler.fish"
if test -f $HB_CNF_HANDLER

View File

@@ -24,6 +24,9 @@ return {
args = { "--fix-to-stdout", "--stdin", "--stdin-filename", "$FILENAME" },
stdin = true,
},
nixpkgs_fmt = {
command = "nixpkgs-fmt",
},
},
formatters_by_ft = {
-- ["*"] = { "codespell" },
@@ -40,6 +43,7 @@ return {
lua = { "stylua" },
markdown = { { "prettierd", "prettier" } },
mdx = { { "prettierd", "prettier" } },
nix = { "nixpkgs_fmt" },
python = { "isort", "black" },
ruby = { "rubyfmt", "rubocop" },
eruby = { "htmlbeautifier" },

View File

@@ -24,6 +24,7 @@ return {
"isort",
"json-lsp",
"lua-language-server",
"nixpkgs-fmt",
"prettier",
"prettierd",
"pyright",

View File

@@ -5,3 +5,4 @@ asdf install rust latest
asdf global rust latest
cargo install stylua
cargo install nixpkgs-fmt