Skip to content

Enhanced Syntax Highlighting for Go Package Names, Constants, and Variables #3584

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

Closed
RelicOfTesla opened this issue Oct 31, 2024 · 2 comments
Milestone

Comments

@RelicOfTesla
Copy link

RelicOfTesla commented Oct 31, 2024

Description:

The current Go extension for VS Code lacks specific syntax highlighting for package names, constants, and variables. This makes it difficult to visually differentiate these important elements in Go code.

Current Limitation:

Package names, constants, and variables all use the general 'variable.other.go' scope, making them visually indistinguishable from each other.

Feature Request:

Implement dedicated scopes for Go package names, constants, and variables (e.g., "entity.name.package.go", "variable.constant.go", "variable.other.go" or similar).

Benefits:

  • Improved code readability
  • Better visual distinction between package names, constants, and variables
  • Enhanced customization options for users to highlight these elements differently
    
    Version Information:
    VS Code Go Extension: v0.42.1
    VS Code: [1.95]
    
    Thank you for considering this feature request. This enhancement would significantly improve the coding experience for Go developers using VS Code by providing clearer visual distinctions between these key language elements.
@gopherbot gopherbot added this to the Untriaged milestone Oct 31, 2024
@wtask
Copy link

wtask commented Nov 1, 2024

These settings are already available. At least most of them are.
image
image
image

@RelicOfTesla
Copy link
Author

RelicOfTesla commented Nov 2, 2024

thanks. Open the gopls{ ui.semanticTokens } option to solve the problem. vscode not open this by default(#2286)

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

3 participants