# Improve Go syntax highlighting \(\#25327\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7deceb62dcd570b64eb3996dcb648831d0ff760f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7deceb62dcd570b64eb3996dcb648831d0ff760f

Requested commit: 7deceb62dcd570b64eb3996dcb648831d0ff760f

Commit: 7deceb62dcd570b64eb3996dcb648831d0ff760f

Tree: 9a415a73a1b2edd1cf4813fe044f39852278307e

Author: chbk

Committer: GitHub

## Message

````
Improve Go syntax highlighting (#25327)

Release Notes:

  - Improved Go syntax highlighting.

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/7f6113cb-0517-4ea7-a979-902a2373314e)
|
![Image](https://github.com/user-attachments/assets/0cf07ebc-c5bd-4269-af7a-49496305d265)
|

- `package_identifier`: `namespace`, language-agnostic scope for
modules, packages, namespaces
- `method_elem`: `function.method`
- `;` ,`.` ,`,` ,`:`: `punctuation.delimiter`

```go
package my_package
import (
  pkg "fmt"
)
type A interface {
  method_elem(foo int, bar float64) int
}
func main() {
  identifier := true
  const constant int = 3
  for i := 0; i <= 3; i++ {
    pkg.Println(identifier)
  }
}
```

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
````

## Parents

- [a97a2ebf35e0d2a6bd06c558dfe8e888a1490909](https://git.cafe/gitcafe/zed/commit/a97a2ebf35e0d2a6bd06c558dfe8e888a1490909?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7deceb62dcd570b64eb3996dcb648831d0ff760f?format=markdown)
