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
- Only when [Diagnostics Refresh](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnostic_refresh) is supported by your client
17
19
18
20
## Workspace Options
19
21
20
22
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
-
|`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 |
27
-
|`flags`|`Map<string, string>`|`<empty>`| Special oxc language server flags, currently only one flag key is supported: `disable_nested_config`|
|`configPath`|`<string>`\|`null`|`null`| Path to a oxlint configuration file, passing a string will disable nested configuration |
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 |
28
+
|`flags`|`Map<string, string>`|`<empty>`| Special oxc language server flags, currently only one flag key is supported: `disable_nested_config`|
29
+
30
+
### Flags
31
+
32
+
-`key: disable_nested_config`: Disabled nested configuration and searches only for `configPath`
|`run`|`"onSave" \| "onType"`|`"onType"`| Should the server lint the files when the user is typing or saving |
40
+
41
+
## Diagnostics Modes
42
+
43
+
Depending on the client, the server will push diagnostics, or will wait for a pull request from the client.
44
+
The server will prefer pull diagnostics when the client supports it and able to support [textDocument/diagnostic/refresh](#textdocumentdiagnosticrefresh).
28
45
29
46
## Supported LSP Specifications from Server
30
47
@@ -47,11 +64,6 @@ The client can pass the workspace options like following:
47
64
}
48
65
```
49
66
50
-
#### Flags
51
-
52
-
-`key: disable_nested_config`: Disabled nested configuration and searches only for `configPath`
When the client did not pass the workspace configuration in [initialize](#initialize), the server will request the configuration for every workspace with [workspace/configuration](#workspaceconfiguration).
@@ -110,31 +122,39 @@ Executes a [Command](https://microsoft.github.io/language-server-protocol/specif
When the configuration `run` is set to `onSave`, the server will validate the file content and send a [textDocument/publishDiagnostics](#textdocumentpublishdiagnostics) request to the client.
131
+
The server will cache the internal content of the text document.
132
+
When the server is using [Push Mode](#diagnostics-modes) and configuration `run` is set to `onSave`,
133
+
the server will validate the text document and send a [textDocument/publishDiagnostics](#textdocumentpublishdiagnostics) request to the client.
When the configuration `run` is set to `onType`, the server will validate the file content and send a [textDocument/publishDiagnostics](#textdocumentpublishdiagnostics) request to the client.
137
+
The server will cache the internal content of the text document.
138
+
When the server is using [Push Mode](#diagnostics-modes) and configuration `run` is set to `onType`,
139
+
the server will validate the text document and send a [textDocument/publishDiagnostics](#textdocumentpublishdiagnostics) request to the client.
Returns a [PublishDiagnostic object](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#publishDiagnosticsParams)
157
+
Returns a list of [CodeAction](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction)
138
158
139
159
## Optional LSP Specifications from Client
140
160
@@ -148,6 +168,13 @@ The server will send this request to watch for specific files. The method `works
148
168
149
169
The server will send this request to stop watching for specific files. The `id` will match from [client/registerCapability](#clientregistercapability).
When the server is using [Push Mode](#diagnostics-modes) it will lint the file [onOpen](#textdocumentdidopen) and [onChange](#textdocumentdidchange) or [onSave](#textdocumentdidsave)
176
+
(depending on the configuration the client passed).
0 commit comments