rokucommunity / vscode-brightscript-language

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

hide is highlighted incorrectly #356

Open chrisdp opened 2 years ago

chrisdp commented 2 years ago

image

sub updateProgress(progress = 0 as Float, hide = false as Boolean)
    m.__loadingBar.update({ "progress": progress, "visible": NOT hide })
end sub
TwitchBronBron commented 2 years ago

That variable is being colorized based on this rule. image

Perhaps we should just delete this matcher entirely. It's been there since the beginning of this project. I don't know that we need to colorize the "built-in" functions at all? Most of these are functions on components, but the way it matches, it'll colorize those even when not used on an object. Also, we already colorize any variable that is followed by an opening paren already.

There are other "support functions" that we might consider scrapping as well: https://github.com/rokucommunity/vscode-brightscript-language/blob/697982e580b7f9ffaba4665fa817f1bbdc4a8b1e/syntaxes/brightscript.tmLanguage.json#L539-L557

TwitchBronBron commented 2 years ago

Based on our discussion, all of these built-ins should be removed from the syntax highlighting, and the language server will send semantic tokens instead.