Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color change when adding return type to class method #157

Closed
jwoertink opened this issue Jan 11, 2023 · 5 comments
Closed

Color change when adding return type to class method #157

jwoertink opened this issue Jan 11, 2023 · 5 comments
Labels

Comments

@jwoertink
Copy link

Notice in this screenshot, the methods being called in the run instance method are currently white, and the class self.run method has no return type

image

Then when I add a return type to the class self.run method, all of the calls in the instance run method turn blue

image

@jwoertink jwoertink added the bug label Jan 11, 2023
@nobodywasishere
Copy link
Member

I wasn't able to replicate this for some reason. What theme are you using in VSCode?

Screenshot_2023-07-21_00-05-45
Screenshot_2023-07-21_00-05-58

@jwoertink
Copy link
Author

I've switched themes, and I'm still getting this. Here's some more info:

image

The theme I'm using now is "Bearded Theme Black and Emerald".

The specific file in the screenshots is actually from Lucky

https://github.com/luckyframework/lucky_cli/blob/main/src/generators/web.cr

another interesting issue here is that if I create a different class method, this doesn't happen... seems to be just that one?

image
image

Very strange 😂

@nobodywasishere
Copy link
Member

Ah thank you! I figured it out. The end condition for methods with arguments didn't account for return parameters, and so it was capturing everything afterwards. https://github.com/crystal-lang-tools/vscode-crystal-lang/blob/c990acde25a020e910ca1092991e62289ceaa6c9/syntaxes/crystal.json#L291C6-L291C6. With a small change this should be fixed in the next release!

Screenshot_2023-07-22_17-54-56
Screenshot_2023-07-22_17-54-15

@jwoertink
Copy link
Author

Woo hoo! Good find 👍

@jwoertink
Copy link
Author

This looks to be fixed in the v0.9.0-alpha release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants