nvim: add json formatter

nixos
Moritz Böhme 2023-03-02 09:14:27 +01:00
parent e2d4143c2a
commit 05631f016d
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
2 changed files with 4 additions and 4 deletions

View File

@ -40,6 +40,7 @@ in
alejandra alejandra
black black
isort isort
jq
nil nil
nixpkgs-fmt nixpkgs-fmt
rustfmt rustfmt

View File

@ -193,11 +193,10 @@ require("formatter").setup({
log_level = vim.log.levels.WARN, log_level = vim.log.levels.WARN,
-- All formatter configurations are opt-in -- All formatter configurations are opt-in
filetype = { filetype = {
-- Formatter configurations for filetype "lua" go here json = {
-- and will be executed in order require("formatter.filetypes.json").jq,
},
lua = { lua = {
-- "formatter.filetypes.lua" defines default configurations for the
-- "lua" filetype
require("formatter.filetypes.lua").stylua, require("formatter.filetypes.lua").stylua,
}, },
nix = { nix = {