Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dannymcgee/vscode-go-grammar

A detailed TextMate grammar for Go
https://github.com/dannymcgee/vscode-go-grammar

go golang grammar syntax-highlighting textmate-grammar vscode vscode-extension

Last synced: 27 days ago
JSON representation

A detailed TextMate grammar for Go

Awesome Lists containing this project

README

        

# Go Grammar

This extension provides a highly detailed VSCode TextMate grammar for Go. The TextMate scopes are mostly borrowed from Microsoft's TypeScript grammar, so it should work out-of-the-box with your favorite theme.

![Dark+](examples/darkplus.png)
![Material](examples/material.png)
![One Dark Pro](examples/onedarkpro.png)

Do note that some of the highlights aren't _quite_ right due to the limits of TextMate's grammar format (and the limits of my patience 🙂), particularly around variables vs packages vs types. If this sort of thing bugs you as much as it bugs me, you can install my [patched version of gopls](https://github.com/dannymcgee/golang-tools/tree/semantic-tokens) to fix it.

![Summer Vacation (grammar only)](examples/summervac--syntax-only.png)
![Summer Vacation (semantic tokens)](examples/summervac--semantic-tokens.png)