microsoft / microsoft/vscode-textmate

Clarification about concurrent tokenization using multiple themes

Open
#218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
678
Forks
135
Avg merge
1d 14h
Merged PRs (30d)
2

Description

Registry.prototype.setTheme has this comment:

/**
 * Change the theme. Once called, no previous `ruleStack` should be used anymore.
 */

But, is that actually true if I always call setTheme with the same theme right before each tokenizeLine2 call? Or do I really need to basically create a dedicated registry for each theme that I've registered if I want to support tokenizing using different themes concurrently?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Registry.prototype.setTheme and tokenizeLine2 to determine how ruleStack state is shared between calls. Document whether resetting the same theme before each call is sufficient for concurrent tokenization, or whether each theme requires a separate registry.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.