Coder Social home page Coder Social logo

Comments (17)

drdrr avatar drdrr commented on June 11, 2024 2

Yeah, after the plugin was updated, I also noticed that tags and variables are not properly formatted.
In older 2.0.16:
image
In 2.2.1 and 2.3.1:
image

In this case the updated syntax is actually properly highlighted. The tags are now individually colored and the placeholders are parsed as python expressions instead of a simple tag. I do see that your theme does give the same color to tags as variables and doesn't highlight punctuation in a different color than the string, so you might want to add a color rule for that.

As an example of a theme that does support it, have a look at the image in issue #328

What is the theme you are using?

Thanks! I'm using Atom One Dark. And One Dark Pro too. I noticed using the default theme Default Dark Modern, the brackets do highlight differently. Will try to customize a little
image

from vscode-language-renpy.

duckdoom4 avatar duckdoom4 commented on June 11, 2024 1

Hm, I checked those when I pushed 2.3.1.. Worked fine then. I'll have another look tomorrow, maybe I messed it up in my hasty fix

from vscode-language-renpy.

Savage1969 avatar Savage1969 commented on June 11, 2024 1

@duckdoom4
It's doing a similar thing with some tags within Style defines but only some tags such as:
color
background
unscrollable
or any tag that has a hyphen in it such as
idle_color
drop_shadow_color
etc.

Would you be able to compile a list of style properties that are not highlighted properly and submit it as a seperate issue? That would be super helpful, then I can fix all of them in one go tomorrow :)

There's so many. I truly think if you open any larger project in v2.1.7 (last known version with no color issues) and any current build you'll quickly see all the differences... even Character variables have changed coloring in all themes. The current builds also broke "Better Comments" which I know many folks use (an extension that changes color of comments with certain symbols post the pound symbol "#" such as "#*", "#!", and "#?"... as well as TODO tags).

But I'll try to find them all... it's going to be a rather large list so I need to find time when not working on projects and on the clock..

from vscode-language-renpy.

Savage1969 avatar Savage1969 commented on June 11, 2024 1

Please do try out version 2.2.1 that was released just a couple of minutes ago. (Note: it's currently no different from pre-release v2.3.1.)

But this patched a lot of issues with atl and screen language missing highlighting.

Thanks in advance for your efforts :). I'll try to grab some larger open source project from GitHub somewhere (if I can find one)

Apologies, I should have noted that the style issues are in v2.3.1 and didn't mention that in my post here, I did in the other issue #332 though.

from vscode-language-renpy.

duckdoom4 avatar duckdoom4 commented on June 11, 2024 1

Yeah, after the plugin was updated, I also noticed that tags and variables are not properly formatted.

In older 2.0.16:
image

In 2.2.1 and 2.3.1:
image

In this case the updated syntax is actually properly highlighted. The tags are now individually colored and the placeholders are parsed as python expressions instead of a simple tag.
I do see that your theme does give the same color to tags as variables and doesn't highlight punctuation in a different color than the string, so you might want to add a color rule for that.

As an example of a theme that does support it, have a look at the image in issue #328

What is the theme you are using?

from vscode-language-renpy.

Savage1969 avatar Savage1969 commented on June 11, 2024 1

@duckdoom4 note that many use One Dark Pro so you might consider that as well in your testing.

Another issue with coloring is when a style or screen has an init in front of it such as init 1 screen xxxx. It makes common attributes like h/vbox, x/ypos, etc. color incorrectly.

Also (and the reason I write), would you consider making a special v2.1.7 build with the text tag fixes so we have something stable to work with until this is all sorted? v2.1.7 was the last known build that projects all functioned correctly regardless of folder structure and SDK usage. This would be a great help to those of us that are using the product daily, it's quite crippling right now with the static data build not functioning correctly, etc.

Thank you for your consideration and we all sincerely appreciate all your time and efforts.

from vscode-language-renpy.

duckdoom4 avatar duckdoom4 commented on June 11, 2024 1

2.3.3 still broken. For testing simply open any RenPy native "tutorial" 's game folder and look at text tags, styles, etc. This way you aren't dependent folks to provide specific pic examples of private projects.

Some other oddities that weren't in 2.1.7:

  • Comments made after anything seem to be triggered by the colon :and anything afterwards is colored by any theme as non-commented code. Use style whatever: # whatever "\n{=something}something:{/=something}{=something}{size=-2}{color=#333333}" as an example candidate in your own testing rpy.
  • Text tags are still wonky when in an init python initialization container. Use variable = "[var]{b}{i}[_O0O0]{/i}{/b}{size=-12}txt{/size} v[var.tmp][var]" as an example candidate in your own testing rpy. Another example candidate being less complex is var = "{color=#C6C6C6}Txt{/color}"
  • There are more but this should hopefully provide a bit more insight.

Here's an image that gives a visual of the above random examples:
image

Well the problem is that renpy language is rather large and that there are a lot of tiny interactions that could trigger an issue. We have a very large test file that covers a lot of these examples, but as you can see even that's not always enough. That's why I need to ask others to confirm everything is working as intended.

Other than that, thanks for these examples. I'll implement a fix for these today :)

from vscode-language-renpy.

Savage1969 avatar Savage1969 commented on June 11, 2024

@duckdoom4

It's doing a similar thing with some tags within Style defines but only some tags (not all tags) such as:
color
background
unscrollable

or any tag that has an underscore in it such as
idle_color
drop_shadow_color
etc.

from vscode-language-renpy.

duckdoom4 avatar duckdoom4 commented on June 11, 2024

@duckdoom4

It's doing a similar thing with some tags within Style defines but only some tags such as:
color
background
unscrollable

or any tag that has a hyphen in it such as
idle_color
drop_shadow_color
etc.

Would you be able to compile a list of style properties that are not highlighted properly, and submit it as a seperate issue? That would be super helpful, then I can fix all of them in one go tomorrow :)

from vscode-language-renpy.

duckdoom4 avatar duckdoom4 commented on June 11, 2024

Please do try out version 2.2.1 that was released just a couple of minutes ago. (Note: it's currently no different from pre-release v2.3.1.)

But this patched a lot of issues with atl and screen language missing highlighting.

Thanks in advance for your efforts :). I'll try to grab some larger open source project from GitHub somewhere (if I can find one)

from vscode-language-renpy.

drdrr avatar drdrr commented on June 11, 2024

Yeah, after the plugin was updated, I also noticed that tags and variables are not properly formatted.

In older 2.0.16:
image

In 2.2.1 and 2.3.1:
image

from vscode-language-renpy.

duckdoom4 avatar duckdoom4 commented on June 11, 2024

I'll have a look at the scopes used by that theme. Maybe I can introduce some fallback scopes

from vscode-language-renpy.

duckdoom4 avatar duckdoom4 commented on June 11, 2024

@Savage1969 I'd love to help out and fix all the issues on your current project, but to do this I will need your help since I'm not having the same issues you seem to be facing. Could you please post screenshots of specific parts of your code that are incorrectly highlighted?

init 1 screen xxxx

Yes, that's a statement that was indeed missing. I'll implement it right now and will let you know when you can install the new update.

would you consider making a special v2.1.7 build

The current build is based on v2.1.7 with some minor changes, so I'd rather just fix the issue(s). When you go back to that version, does the static data building work as expected?

from vscode-language-renpy.

Savage1969 avatar Savage1969 commented on June 11, 2024

The current build is based on v2.1.7 with some minor changes, so I'd rather just fix the issue(s). When you go back to that version, does the static data building work as expected?

Yes, indeed... with the exception of some projects that have base scripts inside a subfolder (such as "/game/scripts") instead of directly in the (more standard) "/game" folder (but not all of them oddly enough). Most all other projects create and maintain the static data in v2.1.7 (when reverting back to it's build). This is all outside of using VC outside of the SDK.

from vscode-language-renpy.

duckdoom4 avatar duckdoom4 commented on June 11, 2024

Hi all, please try 2.3.3. I added highlighting for the style statement and it's properties.
I think that should fix most of these issues.

There is still screen language that I have to properly tackle. It's kinda hacked in right now to get it somehwat working

from vscode-language-renpy.

Savage1969 avatar Savage1969 commented on June 11, 2024

2.3.3 still broken. For testing simply open any RenPy native "tutorial" 's game folder and look at text tags, styles, etc. This way you aren't dependent folks to provide specific pic examples of private projects.

Some other oddities that weren't in 2.1.7:

  • Comments made after anything seem to be triggered by the colon :and anything afterwards is colored by any theme as non-commented code. Use style whatever: # whatever "\n{=something}something:{/=something}{=something}{size=-2}{color=#333333}" as an example candidate in your own testing rpy.
  • Text tags are still wonky when in an init python initialization container. Use variable = "[var]{b}{i}[_O0O0]{/i}{/b}{size=-12}txt{/size} v[var.tmp][var]" as an example candidate in your own testing rpy. Another example candidate being less complex is var = "{color=#C6C6C6}Txt{/color}"
  • There are more but this should hopefully provide a bit more insight.

Here's an image that gives a visual of the above random examples:
image

from vscode-language-renpy.

Savage1969 avatar Savage1969 commented on June 11, 2024

@duckdoom4,

Some other issues in v2.3.3 that work fine when reverting back to v2.1.7 :

Editor: Color Decorators no longer work (uncommented or commented. Also I believe because they don't work commented is probably the reason why some extensions such as "Better Comments" no longer work as well.

Examples in v2.1.7
image

Examples in v2.3.3
image

from vscode-language-renpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.