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

Use yellow for namespaces, like classes #36

Conversation

MatthiasPortzel
Copy link
Member

@MatthiasPortzel MatthiasPortzel commented Feb 8, 2025

This change is weird, doesn't seem intentional. For example, in Ruby it's common to do

module MyModule
  class MyClass
    ...
  end
end

and MyModule is scoped as entity.name.namespace. Previous this was colored the same as the class declaration. VSCode scopes this as entity.name.type.module.ruby and colors it yellow, same as classes. Of course, the style guide doesn't say anything about namespaces or modules.

Before:
image

After:
image

Closes #35

@MatthiasPortzel
Copy link
Member Author

@uncenter Could you thumbs up that this won't break somewhere that you were intentionally trying to use text.

@uncenter
Copy link
Member

uncenter commented Feb 8, 2025

Namespaces are supposed to be yellow, nice catch. I thought my change looked fine for Rust (which uses plenty of namespaces) and I believe I did it to fix some other issue... do you mind waiting a sec before merging this and I'll go through all the samples I have to confirm this doesn't affect anything else?

@pos-ki
Copy link

pos-ki commented Feb 11, 2025

I also noticed that names of classes that are being inherited from in python are Teal, even though that color should be exclusively for enum variants per the style guide - it should probably also be yellow, like the class names elsewhere

Screenshot From 2025-02-11 13-22-17

@uncenter
Copy link
Member

I also noticed that names of classes that are being inherited from in python are Teal, even though that color should be exclusively for enum variants per the style guide - it should probably also be yellow, like the class names elsewhere

Screenshot From 2025-02-11 13-22-17

Fwiw it helps if you can share your code sample used to get this so that we can test this more easily without having to type it out :)

@pos-ki
Copy link

pos-ki commented Feb 11, 2025

I also noticed that names of classes that are being inherited from in python are Teal, even though that color should be exclusively for enum variants per the style guide - it should probably also be yellow, like the class names elsewhere
Screenshot From 2025-02-11 13-22-17

Fwiw it helps if you can share your code sample used to get this so that we can test this more easily without having to type it out :)

My bad, including it now and will in the future!

class ClassA:
    def __init__(self):
        pass

class ClassB(ClassA):
    def __init__(self):
        super().__init__()

@uncenter
Copy link
Member

Ah yes that should be already fixed in #38.

@MatthiasPortzel
Copy link
Member Author

Closing in favor of #38.

@MatthiasPortzel MatthiasPortzel deleted the module-namespace-color branch February 12, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module / namespace now text
3 participants