-
Notifications
You must be signed in to change notification settings - Fork 382
Description
Hello,
I am the maintainer of the VS Code extension oxc.oxc-vscode.
After restarting the language server with LanguageClient.restart(), the editor does not request diagnostics for a new opened file.
Editing/Saving them does not change anything, the editor will never send textDocument/diagnostic request to the server.
textDocument/didOpen|didChange|didSave are still send to the server.
Steps to reproduce
- Install
oxc.oxc-vscodeextension from the marketplace - Run
npm install oxlintin a project root - Restart the editor, so the extension finds the new oxlint binary
- Open a TS/JS file and write
debugger; - Open a second TS/JS file and write
debugger; - Save both files
You should see one diagnostic for each file.
Close the second file, the diagnostic of that file should disappear.
- Run
Oxc: Restart oxlint servercommand, which will triggerLanguageClient.restart(). - First (opened) file should a refreshed (same) diagnostic.
- Open now the second file again
No diagnostics should now be shown/requested.
Set the following setting to see more information in the Oxlint Output Channel:
This will make it clear, that the editor no longer will request diagnostics to the server. After restarting the editor, everything works as expected.
Logs with oxc.trace.server: message:
2026-02-25 23:35:25.426 [info] Searching for oxlint binary.
2026-02-25 23:35:25.426 [info] Using server binary at: /home/sysix/dev/oxc-vscode/node_modules/.pnpm/oxlint@1.50.0_oxlint-tsgolint@0.15.0/node_modules/oxlint/bin/oxlint
2026-02-25 23:35:25.426 [info] [Trace - 11:35:24 PM] Sending request 'initialize - (0)'.
2026-02-25 23:35:25.426 [info] 2026-02-25T22:35:24.948129Z INFO oxc_language_server::backend: initialize: Some([WorkspaceOption { workspace_uri: Uri(Uri { scheme: "file", authority: Some(Authority { userinfo: None, host: "", host_parsed: RegName(""), port: None }), path: "/home/sysix/dev/oxc-vscode", query: None, fragment: None }), options: Object {"configPath": String("oxlint.config.json"), "tsConfigPath": Null, "unusedDisableDirectives": String("deny"), "typeAware": Bool(true), "disableNestedConfig": Bool(false), "fixKind": String("safe_fix"), "run": String("onType"), "flags": Object {"disable_nested_config": String("false"), "fix_kind": String("safe_fix")}} }])
2026-02-25T22:35:24.948891Z INFO oxc_language_server::backend: oxlint version: 1.50.0
2026-02-25 23:35:25.426 [info] [Trace - 11:35:25 PM] Received response 'initialize - (0)' in 653ms.
2026-02-25 23:35:25.426 [info] [Trace - 11:35:25 PM] Sending notification 'initialized'.
2026-02-25 23:35:25.426 [info] [Trace - 11:35:25 PM] Sending notification 'textDocument/didOpen'.
2026-02-25 23:35:25.426 [info] [Trace - 11:35:25 PM] Sending request 'textDocument/diagnostic - (1)'.
2026-02-25 23:35:25.440 [info] [Trace - 11:35:25 PM] Received request 'client/registerCapability - (0)'.
2026-02-25 23:35:25.440 [info] [Trace - 11:35:25 PM] Sending response 'client/registerCapability - (0)'. Processing request took 1ms
2026-02-25 23:35:25.466 [info] [Trace - 11:35:25 PM] Sending notification '$/setTrace'.
2026-02-25 23:35:25.799 [info] [Trace - 11:35:25 PM] Received response 'textDocument/diagnostic - (1)' in 384ms.
2026-02-25 23:35:25.850 [info] [Trace - 11:35:25 PM] Sending notification '$/setTrace'.
2026-02-25 23:35:30.037 [info] [Trace - 11:35:30 PM] Sending notification 'textDocument/didOpen'.
2026-02-25 23:35:30.037 [info] [Trace - 11:35:30 PM] Sending request 'textDocument/codeAction - (2)'.
2026-02-25 23:35:30.062 [info] [Trace - 11:35:30 PM] Sending request 'textDocument/diagnostic - (3)'.
2026-02-25 23:35:30.136 [info] [Trace - 11:35:30 PM] Sending notification '$/cancelRequest'.
2026-02-25 23:35:30.243 [info] [Trace - 11:35:30 PM] Received response 'textDocument/codeAction - (2)' in 206ms.
2026-02-25 23:35:30.326 [info] [Trace - 11:35:30 PM] Received response 'textDocument/diagnostic - (3)' in 263ms.
2026-02-25 23:35:36.705 [info] [Trace - 11:35:36 PM] Sending notification 'textDocument/didClose'.
2026-02-25 23:35:43.804 [info] [Trace - 11:35:43 PM] Sending request 'shutdown - (4)'.
2026-02-25 23:35:43.804 [info] 2026-02-25T22:35:43.804665Z INFO tower_lsp_server::service::layers: shutdown request received, shutting down
2026-02-25 23:35:43.822 [info] [Trace - 11:35:43 PM] Received response 'shutdown - (4)' in 18ms.
2026-02-25 23:35:43.823 [info] [Trace - 11:35:43 PM] Sending notification 'exit'.
2026-02-25 23:35:43.823 [info] 2026-02-25T22:35:43.823298Z INFO tower_lsp_server::service::layers: exit notification received, stopping
2026-02-25 23:35:43.836 [info] [Trace - 11:35:43 PM] Sending request 'initialize - (0)'.
2026-02-25 23:35:43.840 [info] [Error - 11:35:43 PM] Server process exited with code 0.
2026-02-25 23:35:43.889 [info] 2026-02-25T22:35:43.889038Z INFO oxc_language_server::backend: initialize: Some([WorkspaceOption { workspace_uri: Uri(Uri { scheme: "file", authority: Some(Authority { userinfo: None, host: "", host_parsed: RegName(""), port: None }), path: "/home/sysix/dev/oxc-vscode", query: None, fragment: None }), options: Object {"configPath": String("oxlint.config.json"), "tsConfigPath": Null, "unusedDisableDirectives": String("deny"), "typeAware": Bool(true), "disableNestedConfig": Bool(false), "fixKind": String("safe_fix"), "run": String("onType"), "flags": Object {"disable_nested_config": String("false"), "fix_kind": String("safe_fix")}} }])
2026-02-25T22:35:43.889084Z INFO oxc_language_server::backend: oxlint version: 1.50.0
2026-02-25 23:35:43.901 [info] [Trace - 11:35:43 PM] Received response 'initialize - (0)' in 65ms.
2026-02-25 23:35:43.901 [info] [Trace - 11:35:43 PM] Sending notification 'initialized'.
2026-02-25 23:35:43.903 [info] [Trace - 11:35:43 PM] Sending notification 'textDocument/didOpen'. // this is the opened file
2026-02-25 23:35:43.904 [info] [Trace - 11:35:43 PM] Sending request 'textDocument/diagnostic - (1)'.
2026-02-25 23:35:43.905 [info] [Trace - 11:35:43 PM] Received request 'client/registerCapability - (0)'.
2026-02-25 23:35:43.905 [info] [Trace - 11:35:43 PM] Sending response 'client/registerCapability - (0)'. Processing request took 0ms
2026-02-25 23:35:44.015 [info] [Trace - 11:35:44 PM] Received response 'textDocument/diagnostic - (1)' in 111ms.
2026-02-25 23:35:49.192 [info] [Trace - 11:35:49 PM] Sending notification 'textDocument/didOpen'. // now opend file did not get diagnostics
2026-02-25 23:35:49.192 [info] [Trace - 11:35:49 PM] Sending request 'textDocument/codeAction - (2)'.
2026-02-25 23:35:49.389 [info] [Trace - 11:35:49 PM] Sending notification '$/cancelRequest'.
2026-02-25 23:35:49.391 [info] [Trace - 11:35:49 PM] Sending request 'textDocument/codeAction - (3)'.
2026-02-25 23:35:49.394 [info] [Trace - 11:35:49 PM] Received response 'textDocument/codeAction - (2)' in 202ms.
2026-02-25 23:35:49.412 [info] [Trace - 11:35:49 PM] Received response 'textDocument/codeAction - (3)' in 21ms.
2026-02-25 23:36:02.959 [info] [Trace - 11:36:02 PM] Sending notification 'textDocument/didClose'.
2026-02-25 23:36:02.997 [info] [Trace - 11:36:02 PM] Sending notification 'textDocument/didOpen'. // opening another file does nothing
2026-02-25 23:36:02.997 [info] [Trace - 11:36:02 PM] Sending request 'textDocument/codeAction - (4)'.
2026-02-25 23:36:03.155 [info] [Trace - 11:36:03 PM] Received response 'textDocument/codeAction - (4)' in 158ms.
2026-02-25 23:36:07.792 [info] [Trace - 11:36:07 PM] Sending notification 'textDocument/didClose'.
2026-02-25 23:36:07.880 [info] [Trace - 11:36:07 PM] Sending notification 'textDocument/didOpen'.// same, opening another file does nothing
2026-02-25 23:36:07.880 [info] [Trace - 11:36:07 PM] Sending request 'textDocument/codeAction - (5)'.
2026-02-25 23:36:08.019 [info] [Trace - 11:36:08 PM] Received response 'textDocument/codeAction - (5)' in 139ms.
2026-02-25 23:36:08.209 [info] [Trace - 11:36:08 PM] Sending request 'textDocument/codeAction - (6)'.
2026-02-25 23:36:08.210 [info] [Trace - 11:36:08 PM] Received response 'textDocument/codeAction - (6)' in 1ms.