Skip to content

feat: update oxfmt and oxlint to detect vite plus#4395

Open
V1OL3TF0X wants to merge 4 commits intoneovim:masterfrom
V1OL3TF0X:master
Open

feat: update oxfmt and oxlint to detect vite plus#4395
V1OL3TF0X wants to merge 4 commits intoneovim:masterfrom
V1OL3TF0X:master

Conversation

@V1OL3TF0X
Copy link
Copy Markdown

@V1OL3TF0X V1OL3TF0X commented Apr 17, 2026

Since oxfmt and oxlint have the ability to use vite plus config (as mentioned here: voidzero-dev/vite-plus#629), it would be great to update lspconfig to reflect that (terribly sorry it took me 4 commits to format message correctly)

@justinmk
Copy link
Copy Markdown
Member

justinmk commented Apr 17, 2026

I don't have a sense for how common or urgent this is. Need to hear from other oxlint users.

At some point I would expect users to just... use vim.lsp.config('oxlint', {...} to override the default config, to say where their root file is.

These js projects are out of control, there seems to be 17 different config files in every js workspace. I wonder how other editors deal with this. Related to that, there is a cost to having complex logic:

@justinmk justinmk changed the title (feat): update oxfmt and oxlint to detect vite plus feat: update oxfmt and oxlint to detect vite plus Apr 17, 2026
@V1OL3TF0X
Copy link
Copy Markdown
Author

I don't have a sense for how common or urgent this is. Need to hear from other oxlint users.

Npmx says 136k downloads/week for vite-plus, 4m/week for oxlint / oxfmt. The main problem for me was this feature was not well documented, so I had to dig pretty deep to find out how it's done (came from an issue about supporting per-file formatting on vp and then 4 layers of linked issues). If you think it's not worth changing the config, I'd leave a comment at least to guide someone who wants to implement it. I imagine vite-plus getting more popular with time tho.

These js projects are out of control, there seems to be 17 different config files in every js workspace.

Kinda lol
Here it's a case of vite-plus being a unified toolchain built on top of oxc, which means it integrates both binaries into its config - still quite annoying to handle, yeah

@justinmk
Copy link
Copy Markdown
Member

#4391 is what worries me.

A comment in the docstring is a good start, giving your insight.

I'm not opposed to this change but hoping to hear from other oxlint users. And your root_markers_with_field change looks useful

@TheAlexLichter
Copy link
Copy Markdown

A bit of background: Oxlint and Oxfmt are being used in two typical scenarios:

  1. standalone with an .oxlintrc/oxlint.config.ts (and equivalent for oxfmt)
  2. As part of Vite Plus, which acts as a "wrapper CLI" to avoid having tons of manual tools installed, honoring the vite.config.ts

So both cases are relevant

@V1OL3TF0X
Copy link
Copy Markdown
Author

A bit of background: Oxlint and Oxfmt are being used in two typical scenarios:

  1. standalone with an .oxlintrc/oxlint.config.ts (and equivalent for oxfmt)
  2. As part of Vite Plus, which acts as a "wrapper CLI" to avoid having tons of manual tools installed, honoring the vite.config.ts

So both cases are relevant

And @TheAlexLichter @justinmk correct me if I'm wrong, but the settings here act like a rough heuristic - oxlint/oxfmt will detect their proper configs anyway, according to their internal logic (I know oxlint has some config inheritance for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants