ZIm/crates/languages
chbk 7deceb62dc
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>
2025-02-21 11:32:14 -05:00
..
src Improve Go syntax highlighting (#25327) 2025-02-21 11:32:14 -05:00
Cargo.toml Sort Cargo.tomls (#24417) 2025-02-07 02:14:57 +00:00
LICENSE-GPL chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00