Do you need to write a plugin for this or can you do it e.g. with the user.behaviors
file?
Where can I find a tutorial and comprehensive documentation on this?
Do you need to write a plugin for this or can you do it e.g. with the user.behaviors
file?
Where can I find a tutorial and comprehensive documentation on this?
LightTable uses CodeMirror for syntax highlighting.
If the language you want is one of CodeMirrors existing modes (and it's in the version of the node module that your version of LightTable is using) then you should be able to use the set-syntax
command (ctrl+space then type "syntax" to find it) to apply it to the current editor. You can add the following to your user.behaviors
file to associate the syntax with a given file extension:
[:files :lt.objs.files/file-types [{:exts [:eg],
:mime "text/x-example",
:name "Example",
:tags [:editor.example]}]]
If a CodeMirror mode is not available, you'll first need to write one. Here are some docs on Writing CodeMirror Modes.
@RobinGower's answer works for me, eg for Jade syntax highlighting add [:files :lt.objs.files/file-types [{:name "jade" :exts [:jade] :mime "text/x-jade" :tags [:editor.jade]}] ]
to the user.behaviors
file
@mydoghasworms - have you already seen these pages?
I found a few helpful things on both.