Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Go format string coloring #1291

Closed
Nico-Mayer opened this issue Dec 6, 2023 · 3 comments
Closed

Add Go format string coloring #1291

Nico-Mayer opened this issue Dec 6, 2023 · 3 comments

Comments

@Nico-Mayer
Copy link

Nico-Mayer commented Dec 6, 2023

Is your feature request related to a problem? Please describe.
While working with Go, I observed that all Material themes lack string format coloring. For instance, there is no distinct highlighting for string formatting in expressions like fmt.Printf("Value%d", value).

Describe the solution you'd like
I would appreciate a solution akin to the default Visual Studio Code theme, where all values prefixed with '%' are highlighted.

Additional context
I believe implementing this should be relatively straightforward, given that the default theme already incorporates such features. I would greatly appreciate seeing this enhancement in future updates. I genuinely love the theme – keep up the excellent work! :)

@equinusocio
Copy link
Member

equinusocio commented Dec 7, 2023

Hello, I guess this highlight depends on semantic color highlight. Have you enabled it? If yes, can you post a valid (without errors) code so we can test it?

If not, try enabling it to check if something changes. If not post a valid code here to test against.

@Nico-Mayer
Copy link
Author

Nico-Mayer commented Dec 7, 2023

I have it enabled in my global setting.json:
image

Example with Material Theme Deepforest Hight Contrast:
image

Example with VS Code default Dark+ Theme:
image

edit:

Test Code:

package main

import "fmt"

func main() {
	firstDigit := 1
	lastDigit := 0

	fmt.Printf("First Digit: %d\n", firstDigit)
	fmt.Printf("Last Digit: %d\n", lastDigit)
}

@equinusocio
Copy link
Member

We added support for constant.placeholder tokens in every language, not only go. The color will be red.

Screenshot 2023-12-10 at 10 59 56

Release on the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants