LSP Options
INFO
This document describe the native LSP options for oxlint. Depending on your editor, you may have different options. See Editor setup to configure your editor options.
These options can be defined for each workspace folder separately. File references in the options (e.g. configPath, tsConfigPath) are resolved relative to the workspace folder.
They can be sent by the client in initialize or workspace/didChangeConfiguration requests. If the client supports workspace/configuration, the server will request the options from the client.
Example of initialize request:
{
"processId": 123,
"rootUri": null,
"workspaceFolders": [],
"capabilities": {},
"initializationOptions": [
{
"workspaceUri": "file:///home/user/project",
"options": {
"unusedDisableDirectives": "deny",
"typeAware": true
}
}
]
}Example of workspace/didChangeConfiguration request:
{
"settings": [
{
"workspaceUri": "file:///home/user/project",
"options": {
"unusedDisableDirectives": "deny",
"disableNestedConfig": true
}
}
]
}configPath
type: string
Path to the config file. Similar to --config CLI option. If set, it disables searching for config files.
disableNestedConfig
type: boolean
Whether to disable nested config support. Similar to --disable-nested-config CLI option. It gets automatically enabled when configPath is set.
fixKind
type: "safe_fix" | "safe_fix_or_suggestion" | "dangerous_fix" | "dangerous_fix_or_suggestion" | "none" | "all"
What kind of fixes to generate for code actions.
run
type: "onSave" | "onType"
If your editor does not support textDocument/diagnostic, this option handles when diagnostics are sent to the client.
tsConfigPath
type: string
Path to the tsconfig file. Similar to --tsconfig CLI option. If set, it disables auto discovery for tsconfig files.
typeAware
type: boolean
Whether to enable/disable type-aware linting. It will override the root config's typeAware option if set.
unusedDisableDirectives
type: "allow" | "warn" | "deny"
How to handle unused disable directives. By default, they are allowed and ignored.
