nvim: after/ftplugin/json: Lint on save

This commit is contained in:
Sanchayan Maity 2024-11-18 11:01:48 +05:30
parent 2a5121372f
commit d8187ee775
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -1 +1,8 @@
vim.keymap.set('n', 'gq', ":%!jq '.'<CR>", { noremap=true, silent=true, buffer=0 }) vim.keymap.set('n', 'gq', ":%!jq '.'<CR>", { noremap=true, silent=true, buffer=0 })
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
buffer = 0,
callback = function()
require("lint").try_lint()
end,
})