Skip to content

Validation/Invalidation coordination problem with TreeSitterClient and TextSystemStyler #40

@mattmassicotte

Description

@mattmassicotte

There is currently no good way to coordinate changes between TreeSitterClient and a TextSystemStyler.

On change both a client and the styler need to be updated.

  • If you update the styler first, it will end up trying to validate synchronously (ok), but the client hasn't yet been updated so that fails.
  • If you update the client first, it will produce invalidations that will result in the styler performing work without yet processing the change.

This coordination problem existed with Neon 0.6 as well. The solution was either to wait for the next runloop turn to apply styling (easy, could result in styling flicker), or to use precise NSTextStorage/NSLayoutManger event hooks that aren't easy to set up (without TSYTextStorage from TextStory).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions