mark-wiemer-org / ahkpp

AutoHotkey Plus Plus (AHK++) - AutoHotkey v1 and v2 support for VS Code
https://marketplace.visualstudio.com/items?itemName=mark-wiemer.vscode-autohotkey-plus-plus
Other
156 stars 10 forks source link

Code coloring issue with VSCode Theme: Dark (Visual Studio) #501

Closed homezonebenny closed 1 day ago

homezonebenny commented 2 days ago

There's an issue with the VSCode Theme: "Dark (Visual Studio)" and your AutoHotkey Plus Plus extension.

The coloring is messed up:

image

When I switch the theme to the new "Dark Modern" then it seems working:

image

So that's the issue I want to report. :-) I hope this information helps to address the problem.

The red one is the bugged one, but green one works, and it's the same color theme like the red one:

image

So I "fixed" the bug for me, but still this should be adressed somehow, but maybe it's for the VSCode Developer team directly, not for your plugin.

fade2gray commented 2 days ago

How I see it ...

Screenshot 2024-09-16 163645

homezonebenny commented 2 days ago

@fade2gray That's interessting! I saw on your screenshot that you use the new Dark Theme and instantly tested it if this is the solution and it was.

@mark-wiemer It looks like that the code coloring have a bug when you are using the "old" VSCode Theme "Dark (Visual Studio)".

When I switch the theme to the new "Dark Modern" then it seems working:

image

So that's the issue I want to report. :-) I hope this information helps to address the problem.

The red one is the bugged one, but green one works, and it's the same color theme like the red one:

image

So I "fixed" the bug for me, but still this should be adressed somehow, but maybe it's for the VSCode Developer team directly, not for your plugin.

I edited the original post to address the issue directly.

mark-wiemer commented 1 day ago

@homezonebenny This is a feature, not a bug ;)

In the default Visual Studio Dark theme, function names are white by design. You can see the same behavior in TypeScript:

export function deactivate() {
    return client?.stop();
}

function decode(buf: Buffer) {
    for (const td of textdecoders) {
        try {
            return td.decode(buf);
        } catch { };
    }
    return buf.toString();
}

Visual Studio Dark (not recommended by me):

image

Default Dark+ (recommended by me):

image


Closing as by design / out of scope, please review issues in the VS Code repo itself to see if this is tracked work, but I'd recommend simply using Dark+ :)