microsoft / microsoft/vscode-textmate

injections to not cover forward scoped regions

Open
#83 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It does not appear that injections are working if the scope selection was applied through a forward match.

Its an END rule that forward scopes, (])(?=(\.(?!\.)|::))|(?>[^\s\p{L},]) on [math]::hello it consumes the ](capture 1) and scopes the ::(capture 2). An injection rule to actually consume the :: in a begin rule that is then supposed to catch the hello (but optionally with whitespace or comments between, and then repeat with other accessors) is then applied to the scope of the ::.

A debug indicates that the injection is never scanned, so the scope is not being seen in getInjections. The debug does indicate the forward scoping is working (also confirmed with Inspect TM Scopes in VS Code).

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

Reproduce the reported grammar behavior with [math]::hello, using the END rule and injection rule described in the issue. Start by tracing the debug path through getInjections and compare it with the confirmed forward scoping behavior; done means the injection is scanned and can consume :: before matching hello, including the stated whitespace or comment cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.