nvim: bootstrap minimal nix-first config
This commit is contained in:
parent
8a2e735875
commit
d90c74150f
14 changed files with 557 additions and 12 deletions
23
.config/nvim/lua/plugins/lint.lua
Normal file
23
.config/nvim/lua/plugins/lint.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
lint.linters_by_ft = {
|
||||
sh = { "shellcheck" },
|
||||
bash = { "shellcheck" },
|
||||
zsh = { "shellcheck" },
|
||||
}
|
||||
|
||||
local group = vim.api.nvim_create_augroup("user-lint", { clear = true })
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = group,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue