mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
42aff158ee
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionTriggerKind > /** * Code actions were explicitly requested by the user or by an extension. */ export const Invoked: 1 = 1; /** * Code actions were requested automatically. * * This typically happens when current selection in a file changes, but can * also be triggered when file content changes. */ export const Automatic: 2 = 2; --- > ## Pull request overview > This PR optimizes the oxlint LSP server by avoiding unnecessary linting when code action requests are triggered automatically (e.g., on cursor move or file open) rather than explicitly invoked by the user. Previously, `get_code_actions_for_uri` would always run the linter if no cached actions existed; now it only does so when `trigger_kind` is `INVOKED`. @nrayburn-tech When your code action from file explorer does not work anymore, you can blame this PR 😅 VSCode sends "automatic" for most of the time, only when opening the code action pop over it will send "invoked". At this time we already should have diagnostics because. Most triggers of code actions are diagnostics.