QB64Official / vscode

QB64 Extension for Visual Studio Code.
MIT License
14 stars 3 forks source link

Please do not hard code colors into the extension but instead use themeable properties. #119

Closed grymmjack closed 1 year ago

grymmjack commented 1 year ago

https://github.com/QB64Official/vscode/commit/51bb8ecf51b30f57abb1aa06fae94321a23e1d61#r113996771

I spent 30 minutes trying to override this in the theme. It's not over-rideable. image

image

Example returning a themeable color vs. hardcoded from https://github.com/microsoft/vscode/issues/78660:

const vscode = require('vscode');

function activate(context) {
    var decorator = vscode.window.createTextEditorDecorationType( {
      color: new vscode.ThemeColor('editor.selectionForeground'),
      backgroundColor: new vscode.ThemeColor('editor.selectionBackground')
    });

    context.subscriptions.push(
        vscode.commands.registerCommand('extension.decoratorselect', () => {
            const editor = vscode.window.activeTextEditor;
            if (!editor) { return; }
            editor.setDecorations(decorator, [new vscode.Range(new vscode.Position(1, 0), new vscode.Position(1, 20))]);
        })
    );
};

function deactivate() {}

module.exports = {
    activate,
    deactivate
}
LordDurus commented 1 year ago

This is a good idea and will be done.

LordDurus commented 1 year ago

This is ready to text in v0.9.1

grymmjack commented 1 year ago

Tested and worked for the color, but now new issue with bold #120

LordDurus commented 1 year ago

Making this one done.