Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix goPackageComment highlighting too broad #3637

Merged

Conversation

matthewhughes934
Copy link
Contributor

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

[1] https://go.dev/ref/spec#Package_clause

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

[1] https://go.dev/ref/spec#Package_clause
@bhcleek bhcleek added this to the vim-go v1.29 milestone Jan 29, 2024
@bhcleek bhcleek merged commit c63ed98 into fatih:master Jan 29, 2024
8 checks passed
bhcleek added a commit that referenced this pull request Jan 29, 2024
@matthewhughes934 matthewhughes934 deleted the fix-package-comment-too-broad branch March 16, 2024 14:25
@matthewhughes934
Copy link
Contributor Author

@bhcleek what do you think about upstreaming this change? I've tried that with vim/vim#14213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants