mirror of
https://github.com/zoriya/flake.git
synced 2026-06-05 03:29:51 +00:00
Delete nvim-lint and use biome as an lsp
This commit is contained in:
@@ -65,7 +65,6 @@ in
|
||||
})
|
||||
SchemaStore-nvim
|
||||
roslyn-nvim
|
||||
nvim-lint
|
||||
(conform-nvim.overrideAttrs {
|
||||
# clashes with oil
|
||||
postPatch = "rm doc/recipes.md";
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"nvim-lint",
|
||||
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
|
||||
opts = {
|
||||
javascript = { "biomejs", "eslint_d" },
|
||||
typescript = { "biomejs", "eslint_d" },
|
||||
javascriptreact = { "biomejs", "eslint_d" },
|
||||
typescriptreact = { "biomejs", "eslint_d" },
|
||||
},
|
||||
after = function(plug)
|
||||
local override_severity = function(linter)
|
||||
local old_parser = linter.parser;
|
||||
linter.parser = function(output)
|
||||
local diags = old_parser(output);
|
||||
for _, d in pairs(diags) do
|
||||
d.severity = vim.diagnostic.severity.HINT
|
||||
end
|
||||
return diags
|
||||
end
|
||||
end
|
||||
override_severity(require("lint").linters.eslint_d)
|
||||
override_severity(require("lint").linters.biomejs)
|
||||
|
||||
require("lint").linters_by_ft = plug.opts
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost", "BufEnter" }, {
|
||||
desc = "Lint buf",
|
||||
group = vim.api.nvim_create_augroup("nvim-lint", { clear = true }),
|
||||
callback = function()
|
||||
require("lint").try_lint(nil, { ignore_errors = true })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ vim.lsp.enable("gopls")
|
||||
vim.lsp.enable("bashls")
|
||||
vim.lsp.enable("jsonls")
|
||||
vim.lsp.enable("hyprls")
|
||||
vim.lsp.enable("biome")
|
||||
-- vim.lsp.enable("roslyn_ls")
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
|
||||
Reference in New Issue
Block a user