ZIm/crates/languages/src/go
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
..
brackets.scm vim: Update anyquotes and anybrackets to behave like mini.ai plugin (#24167) 2025-02-17 14:55:48 -07:00
config.toml golang: autoclose backticks (#12050) 2024-05-20 10:18:12 +02:00
embedding.scm chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00
highlights.scm Improve Go syntax highlighting (#25327) 2025-02-21 11:32:14 -05:00
indents.scm chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00
injections.scm Use standard injection.language and injection.content captures (#22268) 2025-01-07 18:17:49 +00:00
outline.scm go: Fix tree-sitter query for outlines (#24861) 2025-02-14 11:45:43 -08:00
overrides.scm Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
runnables.scm Add support for Go fuzz tests (#24107) 2025-02-03 11:33:58 +01:00
textobjects.scm Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00