Skip to content

The restart of a file's highlighting doesn't wait for the end of indexing, as it means to: inSmartMode's result is dropped #2363

Done

Description

@lagergren

LSPFileSupport.restartDaemonCodeAnalyzerWithDebounce means the restart of a file's highlighting to wait for the end of indexing, when the project is in dumb mode, but it doesn't (LSPFileSupport.java:531-534 on main, 0612fe5):

if (executeInSmartMode) {
    action.inSmartMode(project);
}
action.submit(AppExecutorUtil.getAppExecutorService());

Each method of NonBlockingReadAction returns a new action, and leaves the one it's called on as it is. So the result of inSmartMode is dropped, and the action submitted is the one without it: in dumb mode, the restart runs at once, as in smart mode. It's like that since 0ebc3a9, in 0.13.0. It's the only call of its kind in src/main/java.

Effect

Small. During indexing, the daemon runs only the passes that are dumb-aware, and when indexing ends, it restarts the highlighting of every file anyway. So the highlighting ends up the same; the restart during indexing is work for nothing.

Fix

action = action.inSmartMode(project);. #2357 (for #2356) rewrites the same lines, so the fix can go with it or after it.

Activity

  1. added this to the 0.30.3 milestone on Nov 30, 2026
  2. added
    bug
    on Nov 30, 2026
  3. added a commit that references this issue on Nov 30, 2026
    5c20caf
  4. added a commit that references this issue on Nov 30, 2026
    a470eb9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions