Commit Graph

26 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
Boshen 4179e4f85a chore(editors): remove VS Code extension (moved to oxc-vscode repo) (#18982)
## Summary

- Removes `editors/vscode` directory - code has been moved to
https://github.com/nicholasrice/oxc-vscode
- Removes `tasks/vscode_docs` crate (no longer needed)
- Removes CI and release workflows for VS Code extension
- Updates `editors/README.md` to point to the new repository
- Cleans up references in `.gitignore`, `justfile`, `oxc_release.toml`,
`oxfmtrc.jsonc`, `oxlintrc.json`, and `pnpm-workspace.yaml`

closes #17484

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:14:03 +08: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
Boshen 6fca2f7f60 chore(infra): use oxfmt for all files, remove dprint (#16599)
Toml formatting is missing but there's only a few toml files, can wait
for oxfmt plugins.

- [x] Something is slow, can't figure out why, need #16607
2025-12-15 12:06:24 +00: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
connorshea e8b6169200 chore(editor): Improve VS Code extension dev experience (#16087)
Improve the experience of launching the VS Code extension for development purposes. Now it will build it for you automatically when launching the editor extension, rather than you needing to build it yourself.

We could also maybe keep a launch setup that doesn't do this alongside this one, if others prefer using that workflow.

See this video for the workflow of building+launching this from the debug menu in VS Code:

https://github.com/user-attachments/assets/738368d4-88fd-424b-ab96-4b1cfed38491
2025-11-26 13:13:32 +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
camchenry d8e49a15d9 refactor(linter): compute lintable extensions at compile time (#10090)
Previously, we were wasting some time creating a `Vec` at runtime with the lintable extensions, which is all of the JS/TS extensions plus other frameworks extensions like `.vue`. Now, we precompute this as a static string slice at compile time. This also ensures that we are using the same extensions list between `oxlint` and the language server too. Theoretically this is a very minor perf win possibly?
2025-03-29 12:38:23 +00:00
Haoqun Jiang 48db350345 chore(vscode): add recommended vscode extensions for tools used in the project (#10006)
I noticed that both just and typos have official vscode extensions, so I
added them to the recommended extensions list.

The `EditorConfig.EditorConfig` extension was present in the
devcontainer configuration but not in the recommended extensions list,
so I added it there as well.
2025-03-29 20:14:05 +08:00
Sysix 410b8d69b4 test(editor): use debug build of the language server (#10083)
closes #10064
2025-03-28 05:28:06 +00:00
1zumii 45eb35434d chore(linter): add vscode debugger launch config (#8271)
refer to this
[reply](https://discord.com/channels/1079625926024900739/1080101477672046712/1265758176754794598),
add CodeLLDB launch config for debugging oxlint.

usage for real dev like:
```json
{
  "type": "lldb",
  "request": "launch",
  "name": "Debug Oxlint",
  "cargo": {
    "env": {
      "RUSTFLAGS": "-g"
    },
    "args": ["build", "--bin=oxlint", "--package=oxlint"],
    "filter": {
      "name": "oxlint",
      "kind": "bin"
    }
  },
  "args": ["--ignore-pattern=./ignore/**"],
  "cwd": "/home/xxx/temp/oxlint-7102"
}
```

besides, i tired add config in `args` to override `Cargo.toml`
`[profile.dev] debug = false`, but cargo in CodeLLDB throw error.
```json
"args": [
  "build", "--bin=oxlint", "--package=oxlint", 
  "--config profile.dev.debug=true"
]
```

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-01-08 09:51:47 +08:00
Dmitry Zakharov 6d50ee01e4 chore: add vscode recommended extensions (#6739)
This will make it easier to contribute for newbie rust developers if
they not have proper extensions.
2024-11-21 15:46:05 +08:00
Boshen d00a1f6511 chore: use dprint to format js, json and markdown 2024-09-08 13:24:58 +08:00
Don Isaac 28bfc12bea chore: add default VSCode build task (#4822)
Changes the default VSCode build command to run `cargo fmt` and `cargo
test --no-run`. This can be easily run with `Cmd+B` (or `Ctrl+B` for
Windows users).
2024-08-11 23:05:27 +08:00
IWANABETHATGUY f30f6efcdd chore: add some useful informantion log (#1912)
1. Use `log::info` to print some informantion which we would want to
display in release mode,
2. Add config to switch back `debug` log level in development mode.
2024-01-06 22:30:01 +08:00
IWANABETHATGUY 96b8f8f80c fix(lsp): panic when open file not under workspace root (#1871)
Closed #1868
2024-01-02 12:35:21 +08:00
IWANABETHATGUY de2f834774 chore: rename crate oxc_vscode to oxc_language_server (#1825)
1. Closed https://github.com/oxc-project/oxc/issues/1821
2023-12-26 23:01:12 +08:00
IWANABETHATGUY 9897cab220 chore(vscode): improve dx (#1528) 2023-11-24 15:05:27 +08:00
Boshen e4c097bb91 chore: mv dir editor/vscode to editors/vscode (#1203) 2023-11-09 21:13:11 +08:00
阿良仔 8a915cec5c feat: vscode extension (#690)
related: #688 .
There are some unfinished things that need to be finalised by Boshen.

1. Official icon and description for the package.
2. Publishing strategy ( It's probably not a good idea to use
`package.json` as a probe to publish extension, as there's too much
vscode configuration coupled to it, a git tag like `vscode_v0.0.x` might
be worth considering ).
3. License for the extension.
2023-08-06 21:28:49 +08:00