microsoft / microsoft/vscode-textmate
Repository works only when it defined at top level of grammar file
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 678
- Forks
- 135
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 2
Description
In textmate you can define repositroy within a specific rule and it works fine.
I created this grammar file for test
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>qwe</string>
</array>
<key>name</key>
<string>Qwe</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>begin</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.begin.qwe</string>
</dict>
</dict>
<key>end</key>
<string>end</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.end.qwe</string>
</dict>
</dict>
<key>name</key>
<string>meta.begin-end.qwe</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#foo</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>foo</key>
<dict>
<key>match</key>
<string>foo</string>
<key>name</key>
<string>keyword.control.foo.qwe</string>
</dict>
</dict>
</dict>
</array>
<key>scopeName</key>
<string>source.qwe</string>
<key>uuid</key>
<string>06AD8311-7342-4086-843E-BFB83EBC2377</string>
</dict>
</plist>
result in textmate:

result in vscode:

In vscode whole rule stopped working without any error
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the supplied grammar in TextMate and VS Code, focusing on the nested repository and #foo include behavior. Inspect the grammar parsing and repository-resolution entry points, then verify that nested repositories work without stopping the surrounding rule; add regression coverage if the existing test layout supports it.
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