🔧 chore: Add linters to nvim

This commit is contained in:
punkfairie 2024-02-22 19:57:32 -08:00
parent 7ed9150d33
commit 7f362ac912
5 changed files with 78 additions and 42 deletions

View file

@ -0,0 +1,3 @@
module.exports = {
extends: ["gitmoji"],
};

View file

@ -35,6 +35,9 @@ require("lazy").setup({
-- linting
{ import = "lazyvim.plugins.extras.linting.eslint" },
-- lsp
{ import = "lazyvim.plugins.extras.lsp.none-ls" },
-- test
{ import = "lazyvim.plugins.extras.test.core" },

View file

@ -0,0 +1,19 @@
return {
"mfussenegger/nvim-lint",
opts = {
linters_by_ft = {
gitcommit = { "commitlint" },
sql = { "sqlfluff" },
yaml = { "yamllint" },
bash = { "shellcheck" },
sh = { "shellcheck" },
},
linters = {
commitlint = {
args = {
"--config ~/.config/git/commitlint.config.js",
},
},
},
},
}

View file

@ -3,9 +3,11 @@ return {
"williamboman/mason.nvim",
opts = {
ensure_installed = {
-- web
"deno",
"prettier",
-- general
"commitlint",
-- data/conf
"yamllint",
-- shell
"shellcheck",
@ -14,6 +16,13 @@ return {
},
},
{
"williamboman/mason-lspconfig.nvim",
opts = {
automatic_installation = true,
},
},
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
@ -27,6 +36,7 @@ return {
-- web
html = {},
cssls = {},
denols = {},
volar = {
filetypes = {
"typescript",
@ -92,45 +102,6 @@ return {
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
-- general
"comment",
-- git
"diff",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
-- data/conf
"ini",
"ssh_config",
"toml",
-- web
"html",
"css",
"scss",
"javascript",
"jsdoc",
"vue",
-- php
"php",
"phpdoc",
-- shell
"bash",
"fish",
},
},
},
{
"olrtg/nvim-emmet",
config = function()

View file

@ -0,0 +1,40 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
-- general
"comment",
-- git
"diff",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
-- data/conf
"ini",
"ssh_config",
"toml",
-- web
"html",
"css",
"scss",
"javascript",
"jsdoc",
"vue",
-- php
"php",
"phpdoc",
-- shell
"bash",
"fish",
},
},
},
}