EvgeniyPeshkov / syntax-highlighter

Syntax Highlighter extension for Visual Studio Code (VSCode). Based on Tree-sitter.
https://marketplace.visualstudio.com/items?itemName=evgeniypeshkov.syntax-highlighter
MIT License
210 stars 43 forks source link

[JavaScript] Highlight function parameters #11

Closed dimaMachina closed 5 years ago

dimaMachina commented 5 years ago

Did this extension solves this problem ? https://github.com/microsoft/vscode/issues/69824

EvgeniyPeshkov commented 5 years ago

Yes, sure: image

EvgeniyPeshkov commented 5 years ago

Making this screenshot, I've found a bug in TypeScript and Javascript highlighting. It'll be fixed in tomorrow's release.

dimaMachina commented 5 years ago

Oh Jesus! Thank you, finally I will be able move to VSCode after this update Спасибо Евгений ! ;)

EvgeniyPeshkov commented 5 years ago

Не за что )))

EvgeniyPeshkov commented 5 years ago

Hello @B2o5T , I've published the new version. You can install it as usual. TypeScript and JavaScript are fixed.

dimaMachina commented 5 years ago

Hi @EvgeniyPeshkov, I have installed 0.2.7 version. But I don't see any changes, did I miss something?

image

I expected to see function parameters have a different color than variables as in WebStorm

image
EvgeniyPeshkov commented 5 years ago

Oh... It seems I've misled you. Look at the very first answer. I thought you wanted all variables to be highlighted the same way. It's exactly what {Syntax Highlighter} does. But you were asking about all appearances of function's parameter to be highlighted not the same way as local variables. I'm afraid tree-sitter cannot handle this. Being just syntax analyzer, it doesn't track source of underling terms, it's task for language servers. Main idea behind {Syntax Highlighter} is to provide consistent, calm and neat colorization. Therefore we highlight all variables the same way, either they're local, global, static, members or parameters. I'm very sorry for this misunderstanding.