feat: add displayName to BUNDLED_LANGUAGES#470
Conversation
✅ Deploy Preview for shiki-matsu ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
@octref I directly modified the Note some files may not have a |
octref
left a comment
There was a problem hiding this comment.
This is a great start! As you noticed, some name in the original grammar doesn't make sense, like MagicPython, or ASP vb.NET.
Here's what I'd like to see:
- Keep the original match between the normalized grammar filename & the grammar's
namefield. For example,x.tmLanguage.jsonshould havenameasx, in the same case - Add another variable like
vscodeGrammarDisplayNamesingrammarSources.ts. When importing grammars from VS Code, the import script should follow this mapping to find out the correctdisplayName. - For
githubGrammarSources, change the signature to{ id: string, displayName?: string, source: string }[].
Good work and you are really close! Thanks.
35a8a17 to
0b6c037
Compare
|
close/open to trigger ci |
| } | ||
| } | ||
| }, | ||
| "scopeName": "text.tex" |
There was a problem hiding this comment.
I shouldn't have made changes to these files (languages/*.json), but they were changed after running the update:grammars script.
| } | ||
| } | ||
|
|
||
| contentObj['name'] = name |
There was a problem hiding this comment.
The name field will be normalized in the scripts/grammars/normalizeGrammarPaths.ts, so removing it is safe.
octref
left a comment
There was a problem hiding this comment.
Hey, really good work! I have some minor adjustments, mostly for consistency, so I made the changes and pushed them. Thanks a lot for your contribution 🚀
| if (!fs.existsSync(fPath)) { | ||
| console.log(`${chalk.red("'file not found in")} ${chalk.blue(f)}`) | ||
| return | ||
| } |
There was a problem hiding this comment.
Is this necessary? You just read all the files in the dir so they should all exist
BUNDLED_LANGUAGES#469