Hello,
I was trying to add a Textmate language grammar definition file for Twig to get syntax highlighting. Twig is templating language for HTML/PHP.
Here are the steps I went through:
config.tsx: ...
"ui.fontSize": "12px",
"language.twig.textMateGrammar": "[absolute path on my HD to]/twig/grammars/html (twig).json"
Is there anything I'm missing (the syntax highlighting still doesn't work...)? Once I get the correct workflow sorted out, I can reformat this question to serve as a reference for others.
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
@bfulop You can also try the vim syntax highlight if you have issues sorting this out (https://github.com/lumiliet/vim-twig).
In the future Oni will provide a mechanism to fetch vim plugins builtin, for the moment you can check the Configuration wiki page on how set your init.vim and use a plugin loader like NeoBundle.
Thanks @badosu, it worked great!
And installing was even easier: you just need to copy the plugin files (as described in the wiki – installing a vim plugin). The only difference is, that I think from v 0.3.2, the .oni location is no longer in $HOME/.oni/plugins as the Wiki says, but in $HOME/.config/oni/plugins, at least on the Mac.
@badosu you were right to suggest using the vim plugin–in general they contain more than just syntax highlighting but usually other extra features that helps vim understand that language e.g. folding, snippets.
In the future I will always first start with the vim plugin.
Most helpful comment
@bfulop You can also try the vim syntax highlight if you have issues sorting this out (https://github.com/lumiliet/vim-twig).
In the future Oni will provide a mechanism to fetch vim plugins builtin, for the moment you can check the Configuration wiki page on how set your
init.vimand use a plugin loader like NeoBundle.