Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/worlpaker/go-syntax

Rich Syntax Highlighting for Go language
https://github.com/worlpaker/go-syntax

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

Last synced: 3 months ago
JSON representation

Rich Syntax Highlighting for Go language

Awesome Lists containing this project

README

        

# Go Syntax

Rich Syntax Highlighting for [Go](https://go.dev/) language

With this extension, your favorite theme will be able to color your code better.

> **NOTE:** Go Syntax became the default [Go grammar](https://github.com/microsoft/vscode/blob/main/extensions/go/syntaxes/go.tmLanguage.json) in the official VS Code in v1.86 ([release note](https://code.visualstudio.com/updates/v1_86#_new-go-grammar)).

## About

Go Syntax improves your coding experience by providing client-side syntax highlighting based on [TextMate rules](https://macromates.com/manual/en/language_grammars). This means you can enjoy advanced code coloring without relying on the Language Server Protocol (LSP).

Go Syntax is compatible with various platforms, including web-based code editors like [vscode.dev](https://vscode.dev) and [github.dev](https://github.dev).

**⚠️ Warning:** [Gopls' `ui.semanticTokens` setting](https://github.com/golang/vscode-go/wiki/settings#uisemantictokens) is disabled by default and shouldn't be enabled if you want to use this extension.

## Comparisons (Before - After)

### Dark+ Theme - Before

![dark+_before](examples/dark+_before.png)

### Dark+ Theme - After

![dark+_after](examples/dark+_after.png)

### Dracula Theme - Before

![dracula_before](examples/dracula_before.png)

### Dracula Theme - After

![dracula_after](examples/dracula_after.png)

### Ayu Dark Theme - Before

![ayudark_before](examples/ayudark_before.png)

### Ayu Dark Theme - After

![ayudark_after](examples/ayudark_after.png)

## Contributing

Yes, please! Feel free to contribute.

## Credits

This extension enhances [better-go-syntax](https://github.com/jeff-hykin/better-go-syntax) with new features.

Semantic tokens tested thanks to the [vscode-tmgrammar-test](https://github.com/PanAeon/vscode-tmgrammar-test).

## License

[MIT](https://github.com/worlpaker/go-syntax/blob/master/LICENSE)