@@ -12,10 +12,9 @@ return {
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
formatting.stylua,
|
||||
formatting.clang_format,
|
||||
diagnostics.eslint_d.with({
|
||||
diagnostics.eslint.with({
|
||||
condition = function(utils)
|
||||
return utils.root_has_file({ ".eslintrc.js", ".eslintrc.cjs" }) -- only enable if root has .eslintrc.js or .eslintrc.cjs
|
||||
return utils.root_has_file({ ".eslintrc.js" })
|
||||
end,
|
||||
}),
|
||||
},
|
||||
@@ -30,6 +29,8 @@ return {
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end,
|
||||
})
|
||||
else
|
||||
vim.notify("Formatting not supported")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user