nvim: plugins: Add nvim-lint
This commit is contained in:
parent
f0ab1b98bb
commit
46534e547c
5 changed files with 18 additions and 0 deletions
1
nvim/.config/nvim/after/ftplugin/lua.vim
Normal file
1
nvim/.config/nvim/after/ftplugin/lua.vim
Normal file
|
@ -0,0 +1 @@
|
||||||
|
autocmd! BufWritePost <buffer> lua require('lint').try_lint()
|
|
@ -13,3 +13,5 @@ let g:pandoc#formatting#textwidth = 79
|
||||||
let g:pandoc#formatting#mode = "hA"
|
let g:pandoc#formatting#mode = "hA"
|
||||||
let g:pandoc#completion#bib#mode = 'citeproc'
|
let g:pandoc#completion#bib#mode = 'citeproc'
|
||||||
let g:pandoc#syntax#codeblocks#embeds#langs = ["c", "rust", "haskell", "literatehaskell=lhaskell", "bash=sh"]
|
let g:pandoc#syntax#codeblocks#embeds#langs = ["c", "rust", "haskell", "literatehaskell=lhaskell", "bash=sh"]
|
||||||
|
|
||||||
|
autocmd! BufWritePost <buffer> lua require('lint').try_lint()
|
||||||
|
|
1
nvim/.config/nvim/after/ftplugin/sh.vim
Normal file
1
nvim/.config/nvim/after/ftplugin/sh.vim
Normal file
|
@ -0,0 +1 @@
|
||||||
|
autocmd! BufWritePost <buffer> lua require('lint').try_lint()
|
13
nvim/.config/nvim/after/plugin/nvim-lint.lua
Normal file
13
nvim/.config/nvim/after/plugin/nvim-lint.lua
Normal 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' },
|
||||||
|
}
|
|
@ -89,6 +89,7 @@ local init = function ()
|
||||||
'kosayoda/nvim-lightbulb',
|
'kosayoda/nvim-lightbulb',
|
||||||
}
|
}
|
||||||
-- Language support & syntax highlighting
|
-- Language support & syntax highlighting
|
||||||
|
use 'mfussenegger/nvim-lint'
|
||||||
use 'simrat39/rust-tools.nvim'
|
use 'simrat39/rust-tools.nvim'
|
||||||
-- Coq
|
-- Coq
|
||||||
use {
|
use {
|
||||||
|
|
Loading…
Reference in a new issue