Skip to content

Commit

Permalink
nvim(plugin/linter): lazy load nvim-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gelocraft committed Jan 17, 2025
1 parent c7ec363 commit 8d58b74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nvim/lua/plugins/linting.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
return {
'mfussenegger/nvim-lint',
lazy = vim.fn.argc(-1) == 0,
event = 'BufReadPost',
config = function()
require('lint').linters_by_ft = {
sh = { 'shellcheck' },
Expand All @@ -12,9 +14,8 @@ return {
typescriptreact = { 'eslint' },
['yaml.ansible'] = { 'ansible_lint' },
}
end,

init = function()
-- PerformLinting
vim.api.nvim_create_autocmd(
{ 'BufReadPost', 'BufNewFile', 'ModeChanged', 'BufWritePost' },
{
Expand Down

0 comments on commit 8d58b74

Please sign in to comment.