microsoft / microsoft/vscode-textmate

Load referenced grammars lazily

Open
#106 3 comments 0 reactions 1 assignee View on GitHub

@mjbvz is already working on this.

Since Aug 15, 2019.

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

Description

From https://github.com/microsoft/vscode/issues/77990

Problem
When loading a grammar that references other grammars, we currently always pull in the referenced grammars eagerly. For languages like markdown that reference a large number of grammars, this can be quite expensive.

Proposed Fix
If possible, we should investigate to see if we can resolve these referenced grammars lazily instead. For example, the markdown grammar should only load the pug grammar when it actually encounters a pug fenced code block while tokenizing text

/cc @alexandrudima

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.