jens1o / vscode-smarty

Smarty syntax highlight extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=imperez.smarty
GNU General Public License v3.0
14 stars 9 forks source link

{* *} Comments not highlighted in the syntax #19

Open mega1meyers opened 6 years ago

mega1meyers commented 6 years ago

Has anyone else had issues with comments not properly being highlighted in the window? I work with some heavy commented out code and the plugin doesn't appear to be picking up the syntax.

jens1o commented 6 years ago

Hi, how would you expect it different? image

mega1meyers commented 6 years ago

That's how I would like it to look. This is what it's doing right now. image I think an embedded CSS comment might be throwing the syntax off?

jens1o commented 6 years ago

Could you please provide the full file? Or at least a file you can reproduce with(which you created for this issue), so I can fix it?

arvislacis commented 5 years ago

screenshot_1

^ Here is one possible example... It happens because of "<" symbol in if operator...

arvislacis commented 5 years ago

I am not sure that this fully solves all problems and/or don't introduce new but one solution is to replace syntaxes/smarty.tmLanguage with this file: https://github.com/textmate/php-smarty.tmbundle/blob/master/Syntaxes/Smarty.plist - then everything seems to work fine.

It would be nice if @jens1o could check this and update extension if needed.

jens1o commented 5 years ago

@arvislacis I'm fine with a pull request, but I would prefer not to replace a file, but to actuaally fix the problem. :/

arvislacis commented 5 years ago

@jens1o You can compare (with diff) both files and then try to figure out the most important differences. As I looked now - there aren't so many of them.

Anyway, it seems that original file in this repository comes from the same place as I mentioned so I don't see a big problem to replace it... And also as far as I have used the replaced file for almost a week I haven't noticed this comment problem again or other issues.

jens1o commented 5 years ago

Perfect! Thanks for your investigations :)