Skip to content

How to change named parameters color in color theme? #1900

Closed

Description

@JCKodel

image

It is possible (and if yes, how) to colorize only the named parameters in VSCode?

(notice in the example above that common text still white, while only named parameters are yellow)

Activity

  1. DanTup commented on Aug 1, 2019

    @DanTup
    Member

    I don't think it's currently possible - though is your screenshot from VS Code or IntelliJ? If VS Code, which theme is it that shows them in yellow?

  2. JCKodel commented on Aug 1, 2019

    @JCKodel
    Author
  3. DanTup commented on Aug 5, 2019

    @DanTup
    Member

    Oh, I see :-)

    In theory, I think it shouldn't be difficult to assign these a different scope so they could be coloured differently. In practice, every time I change the grammar file I break stuff 😄 I'll see what I can do though.

  4. added this to the v3.4.0 milestone on Aug 5, 2019
  5. added
    in editorRelates to code editing or language features
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Aug 5, 2019
  6. modified the milestones: v3.4.0, v3.5.0 on Aug 26, 2019
  7. modified the milestones: v3.5.0, v3.6.0 on Oct 1, 2019
  8. modified the milestones: v3.6.0, v3.7.0 on Oct 28, 2019
  9. DanTup commented on Nov 20, 2019

    @DanTup
    Member

    Upon reviewing the syntax file, I don't think this would be easy. I think there may be upcoming changes to how syntax highlighting works in VS Code (switching to another format from textmate grammars) so I think it would be better to handle this then (since the new format may be better, and may be more easily testable!).

  10. modified the milestones: v3.7.0, On Deck on Nov 20, 2019
  11. SoKamil commented on May 22, 2020

    @SoKamil

    microsoft/vscode#95958
    They did something and also they introduced semantic highlighting for TS and JS, and they have announced it for Java and C++

  12. DanTup commented on May 25, 2020

    @DanTup
    Member

    I do plan to support semantic highlighting - but it will be using LSP (which we're migrating to, but it doesn't have semantic highlighting support yet - the API is still only proposed).

  13. modified the milestones: On Deck, v3.18.0, v3.19.0 on Dec 10, 2020
  14. DanTup commented on Jan 19, 2021

    @DanTup
    Member

    Once https://dart-review.googlesource.com/c/sdk/+/179769 lands (and you're on an SDK that uses it and have the LSP Preview enabled), you'll be able to set the colours of parameter names at call sites with the following settings:

    	"editor.semanticTokenColorCustomizations": {
    		"rules": {
    			"parameter.label": "#990",
    		},
    	},

    Screenshot 2021-01-19 at 10 35 26

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

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions