Giter VIP home page Giter VIP logo

Comments (2)

Swoogan avatar Swoogan commented on June 4, 2024 2

As far as I can find, this isn't controlled by the extension. Syntax highlighters return only a small set of token types to the theme to colour (eg: functions, keywords, strings, comments, etc...)

Single line comments, block comments, docstring, etc... all get injected as "comments" and get themed with the same color. Therefore, I don't think this feature is possible.

However, I have found a workaround. You can override themes in your user settings. In the extension doc comments are specified with the scope comment.line.documentation which you can override with your own color. For example:

"editor.tokenColorCustomizations": {
    "textMateRules": [
        {
            "scope": "comment.line.documentation.zig",
            "settings": {
                "foreground": "#ffd650"
            }
        }
    ],
}

from vscode-zig.

ellacrity avatar ellacrity commented on June 4, 2024 1

This isn't within the scope of this extension.

It's very common for color theme extensions to handle this for the user, emitting normal comments as one color and doc comments in another. For example, I maintain a color theme extension and I do this. It's extremely trivial to implement and improves developer experience.

All information needed to customize the token colors based on whether it is a doc comment or regular comment is being emitted. Users and extensions can customize the colors used, and @Swoogan posted the "fix" 4 years ago.

Since there has been no activity since, I think this issue could probably be closed.

from vscode-zig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.