mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 12:12:13 +02:00
using multiple folders to organize plugins
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
dependencies = {
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
},
|
||||
events = { "BufReadPre", "BufWritePost" },
|
||||
init = function()
|
||||
local lint = require("lint")
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
{ "TextChanged", "TextChangedI", "BufEnter", "BufReadPre", "BufWritePost", "CursorHold", "CursorHoldI" }, {
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
lint.linters_by_ft = {
|
||||
lua = { "luacheck" },
|
||||
javascript = { "eslint" },
|
||||
typescript = { "eslint" },
|
||||
javascriptreact = { "eslint" },
|
||||
typescriptreact = { "eslint" },
|
||||
vue = { "eslint" },
|
||||
sh = { "shellcheck" },
|
||||
fish = { "fish" },
|
||||
json = { "jsonlint", },
|
||||
markdown = { "markdownlint" },
|
||||
php = { "php", "phpcs", "phpstan" },
|
||||
css = { "stylelint" },
|
||||
yaml = { "yamllint" }
|
||||
}
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user