Re-add Neovim configuration files
Re-included from https://github.com/opdavies/opdavies.nvim.
This commit is contained in:
parent
634bf71c6e
commit
8244e157fd
48 changed files with 1864 additions and 97 deletions
19
config/neovim/plugin/lint.lua
Normal file
19
config/neovim/plugin/lint.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
local lint = require "lint"
|
||||
|
||||
lint.linters_by_ft = {
|
||||
dockerfile = { "hadolint" },
|
||||
javascript = { "eslint_d" },
|
||||
json = { "jsonlint" },
|
||||
lua = { "luacheck" },
|
||||
markdown = { "markdownlint" },
|
||||
nix = { "nix" },
|
||||
php = { "php", "phpcs", "phpstan" },
|
||||
}
|
||||
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,
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue