Skip to content

[ENHANCEMENT] Make extension-enforced font styling optional, off by default #581

Description

@jack5github

Is your enhancement request related to a problem? Please describe.
I am currently working on a custom theme for Visual Studio Code, and am finding it incredibly frustrating that I am unable to replace the font styles for Robot Framework with my own, as this plugin overrides them. I am also unable to override the font styling by using settings.json, only add to it.

Describe the solution you'd like
Please make all automatic font styling a setting in the extension that is off by default.

Additional context
Editor tokens and scopes screenshot

Activity

  1. d-biehl commented on Mar 13, 2026

    @d-biehl
    Member

    Creating a new VS Code theme is definitely a cool project, but instead of just getting frustrated, it would be much more helpful if you described the actual problem more clearly and asked more specific questions.

    Right now, it is still not clear what the concrete issue actually is. What exactly do you mean by the screenshot? What in it is wrong? What result are you expecting instead? And what have you already tried so far?

    Also, are you creating this theme just for yourself, or are you planning to publish it? That would be useful to know, because it changes what kind of solution would make the most sense.

    You should also keep in mind that VS Code supports semantic tokenization, and RobotCode uses that. There are quite a few moving parts in how themes, TextMate rules, semantic tokens, and editor settings interact, so this is a lot more complex than simply saying that “the plugin overrides my font style”.

    As far as I know, there is currently no theme that explicitly supports Robot Framework. Because of that, RobotCode provides a few default VS Code settings so Robot Framework files get at least some reasonable styling. Those defaults only use normal VS Code theming features that are generally supported by all themes, such as bold, italic, or underline.

    You can see the exact defaults here:

    "configurationDefaults": {

    These settings are not some custom styling system outside of VS Code. They are regular VS Code defaults, and you can override them.

    If you want to inspect or change them, run the VS Code command Preferences: Open Default Settings (JSON) and search for [robotframework] or textMateRules. That should show you the relevant defaults, and from there you can override them in either your project settings or your user settings.

    For example, you can start with something like this in your settings.json of the project or in your user settings:

    "[robotframework]": {
      "editor.semanticHighlighting.enabled": false
    },
    "editor.tokenColorCustomizations": {
      "textMateRules": []
    },
    "editor.semanticTokenColorCustomizations": {
      "rules": {}
    }

    But as long as the actual problem is not described more precisely, this remains pretty vague. Please explain what exactly is not working, what the screenshot is supposed to demonstrate, what you want to achieve, and what you have already tested. Otherwise, people can only guess what you mean by “overridden styles.”

  2. jack5github commented on Mar 15, 2026

    @jack5github
    Author

    The screenshot simply shows the enforced font styling for *** Comments ***, but similar behaviour can be observed throughout a Robot Framework file while this extension is active. The problematic section of package.json is textMateRules, which defines font styling for language scopes.

    From my testing, there is no way for a custom theme to change the font styling enforced by a plugin. Adding the language scopes to a theme file and attempting to change their fontStyle values has no effect. Therefore, it is not possible to add to, remove or replace such font styling with a custom theme. All of the following do nothing:

    { "scope": "keyword.other.header.settings.robotframework", "settings": {} }
    { "scope": "keyword.other.header.settings.robotframework", "settings": { "fontStyle": "" } }
    { "scope": "keyword.other.header.settings.robotframework", "settings": { "fontStyle": "italic" } }
    

    My custom theme is already published, and can be found here for reference. My intention with it is to make section headers, keyword definitions and test case definitions bold, single-line comments italic, and disable all other font styling.

    Later, I found that I am able to use the above method to disable the settings, but only in the user/workspace settings.json files. While this is somewhat of a solution to my initial problem, it means that people who wish to use my theme and want to have the intended experience when working in Robot Framework must take extra steps to add my theme's recommended scopes and styles to their user files. From then on, the theme will have no control over these user-defined rules, and users may experience styling issues as their outdated rules continue to apply.

  3. d-biehl commented on Mar 30, 2026

    @d-biehl
    Member

    Thanks, that explanation helps.

    I see the distinction you are making now: the issue is not whether these defaults can be overridden somewhere, but that they cannot be reliably controlled by a published theme itself. Requiring additional user/workspace settings.json changes is indeed not a good solution for theme authors.

    The current defaults exist because Robot Framework is usually not styled explicitly by general-purpose themes, so RobotCode tries to provide a reasonable baseline. But I agree that this can conflict with themes that intentionally define their own typography.

    So yes, this is a reasonable enhancement request. We should consider making the extension-provided font styling optional, or at least configurable in a way that does not interfere with custom themes.

    I still need to look into how this can be implemented safely without losing the current behavior for users who rely on those defaults, especially when their theme does not provide any Robot Framework-specific support and they still benefit from improved highlighting out of the box.

    If you already have ideas for how this could be handled in a way that works well for both use cases, feel free to share them here.

  4. added theissue type on Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions