dotfiles/nvim/.config/nvim/after/plugin/nvim-lint.lua

18 lines
568 B
Lua
Raw Normal View History

local nvim_lint = require 'lint'
2021-11-27 12:00:18 +01:00
vim.api.nvim_set_keymap('n', '<LocalLeader>l', ':lua require(\'lint\').try_lint()<CR>', { noremap = true, unique = true })
nvim_lint.linters_by_ft = {
dockerfile = { 'hadolint' },
2021-11-27 12:00:18 +01:00
haskell = { 'hlint' },
javascript = { 'eslint' },
lua = { 'luacheck' },
markdown = { 'vale', 'languagetool' },
python = { 'pylint', 'mypy', 'flake8' },
2021-11-27 12:00:18 +01:00
sh = { 'shellcheck' },
typescript = { 'eslint' },
text = { 'vale', 'languagetool' },
2021-11-27 12:00:18 +01:00
}
nvim_lint.linters.flake8.args = { '--ignore', 'E133,E501,W503' }