Configure your editor for .kage files
March 19, 2024 ยท View on GitHub
There are multiple ways:
- Set your
.kagefiles to be highlighted like.gofiles. - Use sedyh/ebitengine-kage plugins for VSCode, Sublime or Vim. The VSCode plugin in particular is very complete and includes snippets and autocompletion, which can be super handy.
- If you are using Emacs, you might want to consider TLINDEN/kage-mode instead.
If you decide to go with the first option:
- VSCode: open a
.kagefile, press F1 to open the search, type "language", selectChange Language Mode, thenConfigure File Association for '.kage', and selectGofrom the list of options. - Sublime: open a
.kagefile and go toView, thenSyntax, thenOpen all with current extension as...and chooseGo. - Vim: open a
.kagefile and use:set syntax=go. - ...
If your editor is missing or the given instructions don't work, let us know and help us improve this!
Highlighting .kage files on Github
Another nice tip is to add the following line to a .gitattributes file when working with .kage shaders in a Github repository:
# make .kage shaders be highlighted in Github like Go code
*.kage linguist-language=Go
Until .kage becomes an officially supported file extension in Github, this is the best way to get the files highlighted. In fact, since this very repository uses this trick, you can find the file at the root folder.
Let us know if you have similar tricks for other platforms!