Commit Graph

22 Commits

Author SHA1 Message Date
leaysgur 725d106490 docs(language_server): update options doc (#24967) 2026-07-27 01:37:30 +00:00
Sysix 5a4414d0fa feat(oxlint/lsp): support rulesCustomization lsp option (#21858)
> Adds support for an LSP workspace option (`rulesCustomization`) that lets clients customize rule severity and control whether specific rules participate in “fix all” code actions.

related https://github.com/oxc-project/oxc-vscode/issues/22
closes https://github.com/oxc-project/oxc/issues/21538
2026-05-05 09:57:06 +00:00
Dragan Okanovic 71f3286cb4 docs(linter): Fix the FixKind default value (#21721)
Updates the README.md to match what's in the source code:

https://github.com/oxc-project/oxc/blob/main/apps/oxlint/src/lsp/options.rs#L40-L48


https://github.com/oxc-project/oxc/blob/2ccede2ea75b9d2c3d0b56f3ef58eca8363189a6/apps/oxlint/src/lsp/options.rs#L40-L48

---------

Signed-off-by: Dragan Okanovic <1355455+abstractalgo@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Cameron <cameron.clark@hey.com>
2026-04-24 20:56:23 +01:00
camc314 694be7d211 feat(linter): introduce typeAware as config options (#19614) 2026-02-25 11:55:54 +00:00
renovate 5ac8a3e98a chore(deps): update dependency oxfmt to ^0.22.0 (#17679)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|---|---|
| [oxfmt](https://oxc.rs) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt)) | [`^0.21.0` → `^0.22.0`](https://renovatebot.com/diffs/npm/oxfmt/0.21.0/0.22.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/oxfmt/0.22.0?slim=true) | ![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxfmt/0.22.0?slim=true) | ![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxfmt/0.21.0/0.22.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxfmt/0.21.0/0.22.0?slim=true) |

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxfmt)</summary>

### [`v0.22.0`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxfmt/CHANGELOG.md#0220---2026-01-05)

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxfmt_v0.21.0...oxfmt_v0.22.0)

##### 💥 BREAKING CHANGES

- [`f7da875`](https://redirect.github.com/oxc-project/oxc/commit/f7da875) oxlint: \[**BREAKING**] Remove oxc\_language\_server binary ([#&#8203;17457](https://redirect.github.com/oxc-project/oxc/issues/17457)) (Boshen)

##### 🚀 Features

- [`8fd4ea9`](https://redirect.github.com/oxc-project/oxc/commit/8fd4ea9) oxfmt: `options.embeddedLanguageFormatting` is now `"auto"` by default ([#&#8203;17649](https://redirect.github.com/oxc-project/oxc/issues/17649)) (leaysgur)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi42OS4xIiwidXBkYXRlZEluVmVyIjoiNDIuNjkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2026-01-06 01:39:42 +00:00
Sysix 220e8e8121 feat(oxlint/lsp): support textDocument/diagnostic (#17209)
This PR introduces the support for `textDocument/diagnostics`. This will be preferred over the other way around `textDocument/publishDiagnostics`
It is a newer concept between language server and the clients (editors).

> Diagnostics are currently published by the server to the client using a notification. This model has the advantage that for workspace wide diagnostics the server has the freedom to compute them at a server preferred point in time. On the other hand the approach has the disadvantage that the server can’t prioritize the computation for the file in which the user types or which are visible in the editor. Inferring the client’s UI state from the [textDocument/didOpen](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_didOpen) and [textDocument/didChange](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_didChange) notifications might lead to false positives since these notifications are ownership transfer notifications.

> The specification therefore introduces the concept of diagnostic pull requests to give a client more control over the documents for which diagnostics should be computed and at which point in time.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics

For our server, we need one more feature.

> The [workspace/diagnostic/refresh](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnostic_refresh) request is sent from the server to the client. Servers can use it to ask clients to refresh all needed document and workspace diagnostics. This is useful if a server detects a project wide configuration change which requires a re-calculation of all diagnostics.

This is needed because in the current implementation we re-lint the opened files when some `.oxlintrc.json` configuration is changed or `fix_kind` server configuration. Instead of re-linting, the server will send this request to the client.

----

This will be a breaking change for other clients which are sending the `run = onType | onSave` configuration, but are supporting all needed specs for the pull diagnostics mode. The client should instead implement their own configuration and sending the `textDocument/diagnostics` to the server when needed.
2025-12-23 17:52:42 +00:00
Sysix b55df7f76c refactor(language_server): move sub option for flags to the root + deprecate flags (#14933)
Moved the option inside `flags` to the "root" config, you IDE's can implement a simpler UI.
The old `flags` are still supported and gets remapped to the new config.
2025-10-25 22:07:35 +00:00
Sysix 4fbdef2ef4 feat(language_server): support fmt.configPath configuration (#14502)
> This PR adds support for the `fmt.configPath` configuration to the language server, allowing users to specify a custom path to the oxfmt configuration file instead of using the default `.oxfmtrc.json` in the workspace root.
2025-10-12 10:16:58 +00:00
Sysix a21ff54bdc feat(language_server): introduce ServerFormatter (#13700)
First try on formatter integration.
The server will only tell the client, that is supports `formatting` when `fmt.experimental` is `true`.

It will respect the flag in `initialize`, `did_change_configuration` (changing configuration), or `did_change_workspace_folders`.
It will not tell the client, it does not support formatting when the configuration is changed to `false`.
This can be optimized but has no high priority, because the client needs to send the request and the `ServerFormatter` needs to be set. The last requirement is then false.

Make `WorkspaceWorker.option` optional, so we the servers knows when the configuration in `initialize` or `initialized` (with `request_workspace_configuration`). Before the server knew it, by looking at the `WorkspaceWorker.server_linter` instance.
2025-09-20 18:04:55 +00:00
Sysix faee1a4eb7 feat(language_server): add typeAware option (#13146)
related https://github.com/oxc-project/zed-oxc/issues/18
2025-08-26 02:39:53 +00:00
Sysix 5475075733 feat(vscode/language_server): add tsConfigPath option (#12484)
closes https://github.com/oxc-project/oxc/issues/12449
2025-08-04 09:32:27 +00:00
Sysix 094b81c929 feat(language_server): add unusedDisableDirectives option (#11645)
closes #11618

VSCode users are now able to set the severity of unused disabled directives via `oxc.unusedDisableDirectives`.
Other Clients can use this options too, by passing `unusedDisableDirectives` as a new config key.

![screenshot of vscode editor showing the new reporting error](https://github.com/user-attachments/assets/7581db72-7756-4f55-9df1-e873b3ca0f59)
2025-06-13 11:32:52 +00:00
Sysix 35761ae82c refactor(language_server/editor): refresh file watchers without restarting the server (didChangeConfiguration) (#11112) 2025-05-20 08:42:50 +00:00
Sysix be7f7e16e0 feat(language_server/editor): support multi workspace folders (#10875)
Follow up from https://github.com/oxc-project/oxc/pull/10515

Testsetup can be found here: https://github.com/oxc-project/oxc/pull/10515#issuecomment-2845109250
2025-05-11 17:04:26 +00:00
Sysix 3cc1466788 refactor(language_server): new configuration structure for initialize and workspace/didChangeConfiguration (#10890)
This PR introduces a new Options structure, which will be used for `initialize` and `workspace/didChangeConfiguration`.
This is needed for multi workspace support, or else we will do the less performance-way with sending a server-request to the client.

Updated the docs to reflect how to use the new configuration structure
Still used the old structure as a fallback, because the IntelliJ plugin ❤️
2025-05-11 14:31:22 +00:00
Sysix 32b9d1e7d2 feat(language_server): add fix_kind flag (#10226)
closes https://github.com/oxc-project/oxc/issues/8414
2025-04-05 03:14:27 +00:00
Sysix c0e5251235 refactor(language_server): set null as a default value for configPath (#10047)
nothing should change because nested config is disabled with `disable_nested_config`
2025-03-28 05:09:17 +00:00
Sysix da6336c927 refactor(language_server)!: remove enable configuration, the client should shutdown the server instead (#9990) 2025-03-26 17:35:22 +00:00
Alexander S. 8bc70b325b docs(language_server): tell about Initialization options + didChangeWatchedFiles for nested configuration (#9876) 2025-03-19 16:51:16 +08:00
Marek Vospel f4662a96e3 feat(oxc_language_server): implement oxc.fixAll workspace command (#8858)
This pull request focuses on optimizing the implementation of the
`oxlint.applyAllFixesFile` vscode command by adding the command
interface to the LSP instead of requesting all code actions and
executing the preferred ones. This PR contains an abstraction above the
LSP workspace commands, the `oxc.fixAll` command itself and minor
changes to the vscode extension.

Since the `workspace/executeCommand` handler is new, I've created an
abstraction to register the commands and parse their arguments. While it
isn't necessary, I feel like it makes future additions to the LS easier.

I tested the command in both vscode and neovim, doubt it will be hard to
use this in the zed / intellij projects.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-02-04 22:38:33 +01:00
Nicholas Rayburn 38b1c2ec65 feat(editor): Create a command to apply all auto-fixes for the current active text editor (#7672)
Ref #7456

- Creates a custom action in the language server that applies all
auto-fixes for a given file.
- Updates VS Code to use the custom action with a command to apply fixes
for the currently active text editor.
2024-12-13 13:46:05 +08:00
Alexander S. 84fcc43cf5 docs(language_server): add readme (#7429)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-11-24 12:31:23 +08:00