Compare commits

...

2 commits

Author SHA1 Message Date
d8187ee775
nvim: after/ftplugin/json: Lint on save 2024-11-18 11:03:06 +05:30
2a5121372f
nvim: after/plugin/nvim-lint: Enable jq for json
While at it, use eslint and not eslint_d for javascript
and typescript.
2024-11-18 11:03:06 +05:30
2 changed files with 10 additions and 2 deletions

View file

@ -1 +1,8 @@
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,
})

View file

@ -8,12 +8,13 @@ nvim_lint.linters_by_ft = {
fish = { 'fish' },
go = { 'revive' },
haskell = { 'hlint' },
javascript = { 'eslint_d' },
javascript = { 'eslint' },
json = { 'jq' },
lua = { 'luacheck' },
markdown = { 'vale' },
sh = { 'shellcheck' },
systemd = { 'systemd-analyze' },
typescript = { 'eslint_d' },
typescript = { 'eslint' },
yaml = { 'yamllint' },
}