Commit Graph

10 Commits

Author SHA1 Message Date
overlookmotel 94d815d7ff build(vscode): VS Code settings use --all-features (#26259)
Some code in Oxc repo is Cargo feature-gated - most notably all the code in `oxc_data_structures`, but also bits and pieces all over the place.

Currently, when using VS Code, Rust Analyzer only gives you jump-to-definition etc on code which is part of default features set. Code that's gated behind a Cargo feature is "dark" to RA. Ditto `cargo check` and Clippy which are run on save in VS Code. This makes working on feature-gated code slow and annoying.

This PR alters the default VS Code settings for the repo to run Rust Analyzer, check, and Clippy within VS Code with the equivalent of `--all-features`. This matches what `just check` / `cargo ck` and `just lint` do.

This also has a beneficial side effect:

RA shares `target` directory with the terminal. In a workflow where you're using RA and also running `just check` / `just lint` regularly (which agents do), previously each would compile separately with different settings. Now they all use the same settings, so share the same build artifacts. This reduces both compile/check/lint time, and reduces the speed at which `target` directory grows.
2026-09-03 10:59:04 +00:00
leaysgur 6ef3984410 refactor(ci): self-provision prettier suite in oxc_formatter_tests (#25467)
Remove the Prettier related stuff from the conformance, which is purely aimed at JS/TS.

Instead, `oxc_formatter_tests` manage Prettier's test fixtures along with Oxfmt.
2026-08-12 00:40:59 +00:00
overlookmotel e5fad3c66f chore(tools): add VS Code config to speed up Rust Analyzer (#25265)
Prevent Rust Analyzer indexing and tracking files in directories it
doesn't need to (`node_modules`, submodules).

Rust Analyzer doesn't obey `.gitignore`, so the thousands of files in
these directories all get indexed, unless explicitly excluded.

This makes Rust Analyzer's startup faster and makes it use less memory.

Working on my MacBook Air which has limited memory, I've found Rust
Analyzer grinds the machine to a halt when have multiple worktrees going
in different VS Code windows. This appears to help a bit.
2026-08-04 08:24:13 +09:00
Alexander S. a189575412 chore(infra): improve vscode format settings (#18257) 2026-01-21 00:36:04 +08:00
Dunqing 8d48bd74a4 chore(infra): set up the Oxc extension as the default formatter for VSCode (#17932)
All files except `.rust` files can be formatted with `Oxfmt`, so set up the Oxc extension as the default formatter for VSCode, and explicitly set `rust` to use `rust-analyzer` for formatting.
2026-01-12 15:23:53 +00:00
Connor Shea b9dbbdd86c chore(all): Enable formatOnSave for oxc repo. (#17547)
This will ensure that oxfmt is applied automatically on all JS/TS files
that are edited by the developer when working on the oxc repo. The hope
is that this avoids some unnecessary extra `just fmt` runs and
autofix.ci commits.
2026-01-01 20:27:22 +08:00
Connor Shea 597e948103 chore(formatter): Remove a deprecated option from the repo vscode config (#17329)
Should maybe also update the list of languages that use oxfmt as the
default formatter, but that's a problem for someone else to solve :)
2025-12-24 13:07:11 +08:00
Sysix 2fcc079964 chore(vscode): second language server connection for oxfmt (#15837)
This PR implements a second language server connection only for `oxfmt`. Currently, it still uses the shipped `oxc_language_server` binary for formatting. When defining a custom `oxc.path.oxlint` (or `oxc.path.server`), it will start the search process for `node_modules/.bin/oxfmt` or uses `oxc.path.oxfmt`.

This should be **not** a breaking change. When `node_modules/.bin/oxfmt` should be required for formatting, the `ConfigService.useOxcLanguageServerForFormatting` must not be modified. I would love to wait for the correct search implementation for `.node_modules/.bin/oxlint` before breaking the server detection (and probably removing the shipped server too).

### Default / with `oxfmt` installed:
Using the internal language server (once)

### with `oxc.path.oxlint`:
Using the oxlint path server for linting.
Searching for `oxfmt` inside `node_modules/.bin`

### with `oxc.path.fmt`:
Using the internal language server for linting.
Using `oxc.path.fmt` binary

<img width="257" height="233" alt="grafik" src="https://github.com/user-attachments/assets/0776920d-76cd-49cf-9357-fae2ea4a0eb8" />

<img width="193" height="238" alt="grafik" src="https://github.com/user-attachments/assets/c3b2670d-559e-4d0a-96b2-b420e868e1a1" />

<img width="174" height="258" alt="grafik" src="https://github.com/user-attachments/assets/63f9a265-cae9-4971-9c21-86adeacaf35d" />
2025-12-05 15:51:39 +00:00
Sysix 0069b042ca chore(dx): report unused disable directives for vscode extension (#16059)
follow up from https://github.com/oxc-project/oxc/pull/16015
2025-11-24 13:43:11 +00:00
Sysix ea56351fd4 chore(dx): dogfood vscode extension (#15991) 2025-11-23 19:21:11 +00:00