Skip to content

x/tools/gopls: show hover information for runes #38239

Closed
@stamblerre

Description

@stamblerre

From microsoft/vscode-go#3149:

In Go, runes can be expressed as single-quoted readable glyphs, single-quoted escaped \u codes, or number literals (usually hex). It’s often hard to know what a particular rune is, short of extensive commenting as in this example.

It would be very helpful in VSCode to hover over any of these forms to get info on the rune, such as:

  • visual glyph (if any)
  • description e.g. “ARABIC THOUSANDS SEPARATOR”
  • \u representation
  • hex representation

Thanks for the consideration, happy to discuss.

This can be implemented using https://pkg.go.dev/golang.org/x/text/unicode/runenames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions