rokucommunity / vscode-brightscript-language

A Visual Studio Code extension for Roku's BrightScript language
MIT License
110 stars 40 forks source link

feature request: extends brightscript.tmLanguage.json to support .bs #424

Closed ZeeD closed 2 years ago

ZeeD commented 2 years ago

The project offers a tm grammar. But from looking at

https://github.com/rokucommunity/vscode-brightscript-language/blob/159fd098918d62a25591b4e55ea228c5ff40f0ab/syntaxes/brightscript.tmLanguage.json#L4-L6

it seems it's only for ".brs" (BrightScript) files. It would be possible to add ".bs" (BrighterScript) files to it? does it already cover both languages?

TwitchBronBron commented 2 years ago

Yeah, it covers both .brs (BrightScript) and .bs (BrighterScript). I didn't see the benefit to maintaining two completely separate grammars that were 98% the same, especially considering we have a langauge server that would provide diagnostics when using .bs features inside a .brs file. You can see them both referencing the same grammar file here.

ZeeD commented 2 years ago

cool! can I suggest to change the .json to add "bs" to "fileTypes" then? tm4e it's a bit finicky and relies on that field to know on what extensions add syntax highlight

TwitchBronBron commented 2 years ago

Sure! Go ahead and open a PR for that.

ZeeD commented 2 years ago

opened #425