Skip to content

feat: support Vite+ detection and per-tool source selection - #384

Draft
fengmk2 wants to merge 15 commits into
oxc-project:mainfrom
fengmk2:feat/vite-plus-lsp
Draft

feat: support Vite+ detection and per-tool source selection#384
fengmk2 wants to merge 15 commits into
oxc-project:mainfrom
fengmk2:feat/vite-plus-lsp

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 11, 2026

Copy link
Copy Markdown

Implements the Vite+ detection RFC. The extension detects a direct vite-plus dependency and runs vp lint --lsp and vp fmt --lsp. It checks local commands before global installations.

Users select each tool's source with oxc.lint.binarySource and oxc.fmt.binarySource. Both default to auto. Set vite-plus to skip dependency detection, or oxc to use the standalone tool. An explicit oxc.path.vp also selects Vite+ unless the source is oxc. Explicit oxc.path.oxlint and oxc.path.oxfmt settings keep priority.

Servers follow the active project in trusted workspaces. Servers started through vp disable nested configuration discovery. The oxc.useExecPath setting supports local and global npm/pnpm entries. Running without system Node requires vite-plus 0.3.2 or later.

Comment thread README.md Outdated
@fengmk2 fengmk2 changed the title feat: support Vite+ detection and explicit configuration feat: support Vite+ detection and per-tool source selection Sep 12, 2026
fengmk2 added a commit to voidzero-dev/vite-plus that referenced this pull request Sep 12, 2026
`vp lint --lsp` and `vp fmt --lsp` can fail when an editor supplies Node
but `node` is absent from `PATH`.

Built-in tools now use `process.execPath`, passed from the JavaScript
CLI through the native binding. This lets
[oxc-vscode#384](oxc-project/oxc-vscode#384) use
VS Code's bundled Node without temporary runtime shims.

Resolver tests cover eight built-in commands. A CLI snapshot starts lint
and format with a renamed Node executable and no `node` on `PATH`. Both
language servers also passed requests under VS Code's bundled Node on
macOS.

The 68 Rust tests, `vp check`, CLI Clippy, and snapshot comparison
passed. The JavaScript suite passed 1,209 tests. One failure in
`resolve-core.spec.ts` also occurs on unchanged `main`.
@liangmiQwQ

Copy link
Copy Markdown

@fengmk2 Should we automatically inject disableNestedConfig setting when using Vite+ binary?

@fengmk2

fengmk2 commented Sep 12, 2026

Copy link
Copy Markdown
Author

@liangmiQwQ Make sense, I'll revise it.

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.

2 participants