updated config

This commit is contained in:
Daveanand Mannie
2024-08-14 12:41:07 -04:00
parent e07bc2bb46
commit 25b0dfbc24
6 changed files with 76 additions and 234 deletions

28
lua/plugins/linting.lua Normal file
View File

@@ -0,0 +1,28 @@
return {
"mfussenegger/nvim-lint",
event = {
"BufReadPre",
"BufNewFile",
},
config = function()
local lint = require("lint")
lint.linters_by_ft = {
python = { "flake8" },
}
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
group = lint_augroup,
callback = function()
lint.try_lint()
end,
})
vim.keymap.set("n", "<leader>l", function()
lint.try_lint()
end, { desc = "Trigger linting for current file" })
end,
}