vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Go syntax highlighting incorrectly identifies multiplication operator as address operator

Open ChristiannYa opened this issue 7 months ago • 4 comments

When using the multiplication operator (*) in Go code, the syntax highlighter incorrectly identifies it as "keyword.operator.address.go" instead of "keyword.operator.arithmetic.go".

Example code

func Abs(v Vertex) float64 {
  return math.Sqrt(v.X*v.X + v.Y*v.Y)
}

When inspecting the token at the * between v.X and v.X, it shows "keyword.operator.address.go" when it should be an arithmetic operator.

ChristiannYa avatar May 21 '25 02:05 ChristiannYa