You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/oxc_language_server/README.md
+29-15Lines changed: 29 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,16 +19,27 @@ This crate provides an [LSP](https://microsoft.github.io/language-server-protoco
19
19
20
20
These options can be passed with [initialize](#initialize), [workspace/didChangeConfiguration](#workspace/didChangeConfiguration) and [workspace/configuration](#workspace/configuration).
|`run`|`"onSave" \| "onType"`|`"onType"`| Should the server lint the files when the user is typing or saving |
25
-
|`configPath`|`<string>`\|`null`|`null`| Path to a oxlint configuration file, passing a string will disable nested configuration |
26
-
|`tsConfigPath`|`<string>`\|`null`|`null`| Path to a TypeScript configuration file. If your `tsconfig.json` is not at the root, alias paths will not be resolve correctly for the `import` plugin |
27
-
|`unusedDisableDirectives`|`"allow" \| "warn"`\| "deny"` |`"allow"`| Define how directive comments like `// oxlint-disable-line` should be reported, when no errors would have been reported on that line anyway |
|`flags`|`Map<string, string>`|`<empty>`| Special oxc language server flags, currently only one flag key is supported: `disable_nested_config`|
30
-
|`fmt.experimental`|`true`\|`false`|`false`| Enables experimental formatting with `oxc_formatter`|
31
-
|`fmt.configPath`|`<string>`\|`null`|`null`| Path to a oxfmt configuration file, when `null` is passed, the server will use `.oxfmtrc.json` and the workspace root |
|`run`|`"onSave" \| "onType"`|`"onType"`| Should the server lint the files when the user is typing or saving |
25
+
|`configPath`|`<string>`\|`null`|`null`| Path to a oxlint configuration file, passing a string will disable nested configuration |
26
+
|`tsConfigPath`|`<string>`\|`null`|`null`| Path to a TypeScript configuration file. If your `tsconfig.json` is not at the root, alias paths will not be resolve correctly for the `import` plugin |
27
+
|`unusedDisableDirectives`|`"allow" \| "warn"`\| "deny"` |`"allow"`| Define how directive comments like `// oxlint-disable-line` should be reported, when no errors would have been reported on that line anyway |
|`disableNestedConfig`|`false`\|`true`|`false`| Disabled nested configuration and searches only for `configPath`. |
30
+
|`fixKind`|[fixKind values](#fixkind-values)|`safe_fix`| The level of a possible fix for d diagnostic, will be applied for the complete workspace (diagnostic, code action, commands and more). |
31
+
|`fmt.experimental`|`true`\|`false`|`false`| Enables experimental formatting with `oxc_formatter`|
32
+
|`fmt.configPath`|`<string>`\|`null`|`null`| Path to a oxfmt configuration file, when `null` is passed, the server will use `.oxfmtrc.json` and the workspace root |
33
+
|`flags`|`Map<string, string>`|`<empty>`| (deprecated) Custom flags passed to the language server. |
34
+
35
+
### `fixKind` values:
36
+
37
+
-`"safe_fix"` (default)
38
+
-`"safe_fix_or_suggestion`
39
+
-`"dangerous_fix"`
40
+
-`"dangerous_fix_or_suggestion"`
41
+
-`"none"`
42
+
-`"all"`
32
43
33
44
## Supported LSP Specifications from Server
34
45
@@ -47,18 +58,19 @@ The client can pass the workspace options like following:
47
58
"tsConfigPath": null,
48
59
"unusedDisableDirectives": "allow",
49
60
"typeAware": false,
50
-
"flags": {},
61
+
"disableNestedConfig": false,
62
+
"fixKind": "safe_fix",
51
63
"fmt.experimental": false,
52
64
"fmt.configPath": null
53
65
}
54
66
}]
55
67
}
56
68
```
57
69
58
-
#### Flags
70
+
#### Flags (deprecated)
59
71
60
72
-`key: disable_nested_config`: Disabled nested configuration and searches only for `configPath`
0 commit comments