first commit
This commit is contained in:
30
profiles/desktop/.config/nvim/lua/plugins/nvim-lint.lua
Normal file
30
profiles/desktop/.config/nvim/lua/plugins/nvim-lint.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
return {
|
||||
'mfussenegger/nvim-lint',
|
||||
config = function()
|
||||
require('lint').linters_by_ft = {
|
||||
['yaml.ansible'] = { 'ansible_lint' },
|
||||
bash = { 'shellcheck' },
|
||||
make = { 'checkmake' },
|
||||
cmake = { 'cmakelint' },
|
||||
cpp = { 'clangtidy' },
|
||||
c = { 'clangtidy' },
|
||||
editorconfig = { 'editorconfig-checker' },
|
||||
html = { 'tidy' },
|
||||
json = { 'jsonlint' },
|
||||
sql = { 'sqlfluff' },
|
||||
js = { 'standardjs' },
|
||||
css = { 'stylelint' },
|
||||
systemd = { 'systemdlint' },
|
||||
yaml = { 'yamllint' },
|
||||
zsh = { 'zsh' },
|
||||
python = { 'pylint', 'mypy' },
|
||||
}
|
||||
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
|
||||
callback = function()
|
||||
-- try_lint without arguments runs the linters defined in `linters_by_ft`
|
||||
-- for the current filetype
|
||||
require('lint').try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user