Add gitlint linter to nvim
This commit is contained in:
parent
57fa9358f6
commit
929a1110a5
2 changed files with 10 additions and 1 deletions
|
|
@ -2,7 +2,12 @@ return {
|
||||||
"mfussenegger/nvim-lint",
|
"mfussenegger/nvim-lint",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
require("lint").linters_by_ft = {
|
local lint = require("lint")
|
||||||
|
|
||||||
|
lint.linters.gitlint.stdin = true
|
||||||
|
lint.linters.gitlint.args = { "--msg-filename", "-" }
|
||||||
|
|
||||||
|
lint.linters_by_ft = {
|
||||||
javascript = { "eslint_d" },
|
javascript = { "eslint_d" },
|
||||||
typescript = { "eslint_d" },
|
typescript = { "eslint_d" },
|
||||||
javascriptreact = { "eslint_d" },
|
javascriptreact = { "eslint_d" },
|
||||||
|
|
@ -10,6 +15,8 @@ return {
|
||||||
-- astro = { "eslint_d" },
|
-- astro = { "eslint_d" },
|
||||||
python = { "pyright" },
|
python = { "pyright" },
|
||||||
sh = { "shellcheck" },
|
sh = { "shellcheck" },
|
||||||
|
NeogitCommitMessage = { "gitlint" },
|
||||||
|
gitcommit = { "gitlint" },
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,8 @@ return {
|
||||||
pyright = {},
|
pyright = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
sqlls = {},
|
sqlls = {},
|
||||||
|
-- TODO: need latest version of mason-lspconfig
|
||||||
|
-- typos_lsp = {},
|
||||||
tsserver = {
|
tsserver = {
|
||||||
init_options = {
|
init_options = {
|
||||||
preferences = {
|
preferences = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue