mirror of
https://github.com/neovim/neovim.git
synced 2025-12-26 16:19:15 +00:00
runtime(go): `goPackageComment` highlighting too broad
Previously this would highlight any comment before a line starting
`package`, for example
var (
// This comment would be highlighted as a goPackageComment
packages []string
)
The package clause is only valid when followed by a space[1], so include
this restriction
This is upstreaming a change from `go-vim`[2]
[1] https://go.dev/ref/spec#Package_clause
[2] d1c36cc417
3d46de703c
Co-authored-by: Matthew Hughes <matthewhughes934@gmail.com>