JuliaEditorSupport / atom-language-julia

A Julia language support package for the Atom editor
Other
51 stars 39 forks source link

Tokenization of commas changed to `source.julia`, which affects Julia Color Themes #275

Closed CameronBieganek closed 8 months ago

CameronBieganek commented 8 months ago

First reported here: https://github.com/CameronBieganek/julia-color-themes/issues/6

The tokenization of commas used to be meta.bracket (I believe), so commas were colored orange in my Julia Color Themes extension. Now they are colored white, like other source code, which is not what I intended. Was this change intentional? If it was intentional, can we introduce a new scope for commas? In the VS Code Python extension, commas are scoped as punctuation.separator.

I find that having a different color for commas really helps to separate function arguments, array elements, etc.

CameronBieganek commented 8 months ago

Not sure, but it looks like the change might have been introduced in this PR: #268

AquaPore commented 8 months ago

Thanks Cameron, I tested this code into the setting .json and it only changed the ponctuation in the setting.json but not in the the JULIA code.

{ "scope": "punctuation.separator", "settings": { "foreground": "#AE81FF", "fontStyle": "italic" } },

pfitzseb commented 8 months ago

Was this change intentional? If it was intentional, can we introduce a new scope for commas? In the VS Code Python extension, commas are scoped as punctuation.separator.

Yes, this change was intentional. Introducing an additional scope sounds reasonable.

AquaPore commented 8 months ago

Thanks Sebastien,

Will the effect take place in the next release of Julia Language Support in VSC?

Thanks for your help, Joseph

CameronBieganek commented 8 months ago

@AquaPore I will also need to release a new version of Julia Color Themes that makes use of the new punctuation.separator scope that Sebastian introduced in #276. I will try to do that as soon as I can.

AquaPore commented 8 months ago

I tried with no sucess: { "scope": "punctuation.separator", "settings": { "foreground": "#ebe411", "fontStyle": "italic" } },

Joseph

AquaPore commented 8 months ago

No hurry take your time as it is not urgent

CameronBieganek commented 8 months ago

@AquaPore Does the entry in your settings.json file look similar to the following?

    "editor.tokenColorCustomizations": {
        "[Julia (Monokai Classic)]": {
            "textMateRules" : [
                {
                    "scope": "source.julia punctuation.separator",
                    "settings": {
                        "foreground": "#EBE411"
                    }
                }
            ]
        }
    }

However, I don't think the new punctuation.separator scope has been released in the Julia extension yet.