Added eslintd to config

This commit is contained in:
2023-10-09 22:24:57 +02:00
parent 6c882f02a2
commit faec85f1be
2 changed files with 6 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ return {
ensure_installed = { ensure_installed = {
"stylua", "stylua",
"clang-format", "clang-format",
"eslint_d",
}, },
automatic_installation = true, automatic_installation = true,
}) })

View File

@@ -13,6 +13,11 @@ return {
sources = { sources = {
formatting.stylua, formatting.stylua,
formatting.clang_format, formatting.clang_format,
diagnostics.eslint_d.with({
condition = function(utils)
return utils.root_has_file({ ".eslintrc.js", ".eslintrc.cjs" }) -- only enable if root has .eslintrc.js or .eslintrc.cjs
end,
}),
}, },
on_attach = function(client, bufnr) on_attach = function(client, bufnr)