feat(nvim): add nvim lint

This commit is contained in:
Price Hiller 2023-08-28 15:56:07 -05:00
parent 1c3c04da4b
commit dab7611441
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
3 changed files with 25 additions and 3 deletions

View File

@ -1,3 +0,0 @@
local file_loc = vim.fn.expand("%:p:h")
vim.opt_local.makeprg = "docker build " .. file_loc

View File

@ -0,0 +1,9 @@
local file_loc = vim.fn.expand("%:p:h")
vim.opt_local.makeprg = "docker build " .. file_loc
vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI"}, {
callback = function()
require("lint").try_lint()
end
})

View File

@ -0,0 +1,16 @@
return {
{
"mfussenegger/nvim-lint",
event = { "BufReadPre", "BufNewFile" },
config = function()
require("lint").linters_by_ft = {
markdown = {"proselint"}
}
vim.api.nvim_create_autocmd({ "BufWritePost", "BufEnter" }, {
callback = function()
require("lint").try_lint()
end
})
end
}
}