diff --git a/lua/plugins.lua b/lua/plugins.lua index 4c44c79..9d212a1 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,4 +1,10 @@ local plugins = { + { + "jose-elias-alvarez/null-ls.nvim", + }, + { + "MunifTanjim/eslint.nvim", + }, { "williamboman/mason.nvim", }, diff --git a/lua/setuplsp.lua b/lua/setuplsp.lua index b4989d5..3c93997 100644 --- a/lua/setuplsp.lua +++ b/lua/setuplsp.lua @@ -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` + }, +})