add eslint

This commit is contained in:
sadanslargehole 2024-03-22 18:27:51 -04:00
parent d7f03285b0
commit 6fa876bf18
No known key found for this signature in database
GPG key ID: B2E2F4A5161A7800
2 changed files with 28 additions and 0 deletions

View file

@ -1,4 +1,10 @@
local plugins = {
{
"jose-elias-alvarez/null-ls.nvim",
},
{
"MunifTanjim/eslint.nvim",
},
{
"williamboman/mason.nvim",
},

View file

@ -123,3 +123,25 @@ cmp.setup({
})
cmp.event:on("confirm_done", pairs.on_confirm_done())
require("setupclangdext")
require("null-ls").setup()
require("eslint").setup({
bin = 'eslint_d', -- or `eslint`
code_actions = {
enable = true,
apply_on_save = {
enable = true,
types = { "directive", "problem", "suggestion", "layout" },
},
disable_rule_comment = {
enable = true,
location = "separate_line", -- or `same_line`
},
},
diagnostics = {
enable = true,
report_unused_disable_directives = false,
run_on = "type", -- or `save`
},
})