Files
dotfiles/nvim/lua/plugins/none-ls.lua
Stefan Imhoff 0f49475e5e fix(nvim): temporary solution for eslint diagnostics
This uses none-ls to enable typescript-eslint diagnostics. But it is recommended to use the eslint-lsp instead. Haven't figured out how to get typescript-eslint diagnostics with eslint-lsp yet.
2024-02-27 16:10:19 +01:00

19 lines
624 B
Lua

return {
"nvimtools/none-ls.nvim",
enabled = true,
event = "LazyFile",
dependencies = { "mason.nvim" },
opts = function(_, opts)
local nls = require("null-ls")
opts.root_dir = opts.root_dir
or require("null-ls.utils").root_pattern(".null-ls-root", ".neoconf.json", "Makefile", ".git")
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.formatting.fish_indent,
nls.builtins.diagnostics.fish,
nls.builtins.diagnostics.eslint, -- TODO: How to get this feature in eslint-lsp?
nls.builtins.formatting.stylua,
nls.builtins.formatting.shfmt,
})
end,
}