mirror of
https://github.com/sadan4/nvim.git
synced 2024-11-16 22:34:39 -05:00
add eslint
This commit is contained in:
parent
d7f03285b0
commit
6fa876bf18
2 changed files with 28 additions and 0 deletions
|
@ -1,4 +1,10 @@
|
||||||
local plugins = {
|
local plugins = {
|
||||||
|
{
|
||||||
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"MunifTanjim/eslint.nvim",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
},
|
},
|
||||||
|
|
|
@ -123,3 +123,25 @@ cmp.setup({
|
||||||
})
|
})
|
||||||
cmp.event:on("confirm_done", pairs.on_confirm_done())
|
cmp.event:on("confirm_done", pairs.on_confirm_done())
|
||||||
require("setupclangdext")
|
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`
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue