Moved to nvim lint
This commit is contained in:
24
lua/taken/plugins/linting.lua
Normal file
24
lua/taken/plugins/linting.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
config = function()
|
||||||
|
local lint = require("lint")
|
||||||
|
|
||||||
|
lint.linters_by_ft = {
|
||||||
|
javascript = { "eslint_d" },
|
||||||
|
typescript = { "eslint_d" },
|
||||||
|
javascriptreact = { "eslint_d" },
|
||||||
|
typescriptreact = { "eslint_d" },
|
||||||
|
python = { "ruff" },
|
||||||
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -34,7 +34,6 @@ return {
|
|||||||
"jsonls",
|
"jsonls",
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"yamlls",
|
"yamlls",
|
||||||
"eslint",
|
|
||||||
"bashls",
|
"bashls",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,11 +99,6 @@ return {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig["ruff_lsp"].setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- typescript
|
-- typescript
|
||||||
lspconfig["ts_ls"].setup({
|
lspconfig["ts_ls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ return {
|
|||||||
"pyright",
|
"pyright",
|
||||||
"powershell_es",
|
"powershell_es",
|
||||||
"jsonls",
|
"jsonls",
|
||||||
"eslint",
|
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"yamlls",
|
"yamlls",
|
||||||
"bashls",
|
"bashls",
|
||||||
@@ -46,7 +45,7 @@ return {
|
|||||||
"prettier",
|
"prettier",
|
||||||
"dprint",
|
"dprint",
|
||||||
"ruff",
|
"ruff",
|
||||||
"ruff-lsp",
|
"eslint_d",
|
||||||
"rustywind",
|
"rustywind",
|
||||||
},
|
},
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user