nvim: plugins: Add nvim-lint

This commit is contained in:
Sanchayan Maity 2021-11-27 16:30:18 +05:30
parent f0ab1b98bb
commit 46534e547c
5 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1 @@
autocmd! BufWritePost <buffer> lua require('lint').try_lint()

View File

@ -13,3 +13,5 @@ let g:pandoc#formatting#textwidth = 79
let g:pandoc#formatting#mode = "hA"
let g:pandoc#completion#bib#mode = 'citeproc'
let g:pandoc#syntax#codeblocks#embeds#langs = ["c", "rust", "haskell", "literatehaskell=lhaskell", "bash=sh"]
autocmd! BufWritePost <buffer> lua require('lint').try_lint()

View File

@ -0,0 +1 @@
autocmd! BufWritePost <buffer> lua require('lint').try_lint()

View File

@ -0,0 +1,13 @@
vim.api.nvim_set_keymap('n', '<LocalLeader>l', ':lua require(\'lint\').try_lint()<CR>', { noremap = true, unique = true })
require('lint').linters_by_ft = {
haskell = { 'hlint' },
javascript = { 'eslint' },
lua = { 'luacheck' },
markdown = { 'vale' },
pandoc = { 'vale' },
python = { 'flake8', 'mypy', 'pycodestyle', 'pylint' },
sh = { 'shellcheck' },
typescript = { 'eslint' },
text = { 'vale' },
}

View File

@ -89,6 +89,7 @@ local init = function ()
'kosayoda/nvim-lightbulb',
}
-- Language support & syntax highlighting
use 'mfussenegger/nvim-lint'
use 'simrat39/rust-tools.nvim'
-- Coq
use {