Use the LazyVim oxc extra instead of hand-rolled oxlint config
The oxlint LSP now enables type-aware linting on its own when tsgolint is present and .oxlintrc.json mentions typescript, and ships :LspOxlintFixAll -- which is what the oxlint_fix function reimplemented by shelling out to the CLI. The extra also sets fixKind = "all" and prefers the top-level oxlint config in monorepos. Fixes now apply as a workspace edit instead of writing to disk and reloading. oxfmt takes js/ts/json/vue over prettier; prettier keeps css/html/yaml/markdown. Add oxlint to mason so it resolves outside projects with a local install. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+29
-20
@@ -1,25 +1,34 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
diagnostics = {
|
||||
virtual_text = false,
|
||||
virtual_lines = { current_line = true },
|
||||
},
|
||||
servers = {
|
||||
clangd = {
|
||||
-- removing .proto from the list of filetypes since clangd doesn't seem to be able to parse them
|
||||
filetypes = { "c", "cpp", "objc", "objcpp", "cuda" },
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
diagnostics = {
|
||||
virtual_text = false,
|
||||
virtual_lines = { current_line = true },
|
||||
},
|
||||
servers = {
|
||||
clangd = {
|
||||
-- removing .proto from the list of filetypes since clangd doesn't seem to be able to parse them
|
||||
filetypes = { "c", "cpp", "objc", "objcpp", "cuda" },
|
||||
},
|
||||
oxlint = {
|
||||
keys = {
|
||||
{ "<leader>cx", "<cmd>LspOxlintFixAll<cr>", desc = "Oxlint Fix All" },
|
||||
},
|
||||
},
|
||||
},
|
||||
-- Disable eslint formatting as it's slow and timing out on big projects
|
||||
-- taken from
|
||||
-- https://github.com/LazyVim/LazyVim/pull/4225/files
|
||||
setup = {
|
||||
eslint = function()
|
||||
return
|
||||
end,
|
||||
},
|
||||
-- Disable oxlint LSP - using nvim-lint with CLI instead for type-aware support
|
||||
oxlint = { enabled = false },
|
||||
},
|
||||
-- Disable eslint formatting as it's slow and timing out on big projects
|
||||
-- taken from
|
||||
-- https://github.com/LazyVim/LazyVim/pull/4225/files
|
||||
setup = {
|
||||
eslint = function()
|
||||
return
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
opts = { ensure_installed = { "oxlint" } },
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user