Files
neovim-config/lua/plugins/conform.lua
T
thalladaandClaude Opus 5 995ecb11d3 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>
2026-07-31 13:18:30 -04:00

25 lines
528 B
Lua

local oxfmt_owned = {
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"json",
"jsonc",
"vue",
}
return {
"stevearc/conform.nvim",
opts = function(_, opts)
opts.formatters_by_ft = opts.formatters_by_ft or {}
for _, ft in ipairs(oxfmt_owned) do
local formatters = opts.formatters_by_ft[ft]
if formatters then
opts.formatters_by_ft[ft] = vim.tbl_filter(function(formatter)
return formatter ~= "prettier"
end, formatters)
end
end
end,
}