Simple way to get LightTable to recognize a cljx file as clj?

804 views
Skip to first unread message

Ethan Sherbondy

unread,
Dec 23, 2013, 5:49:51 PM12/23/13
to light-table...@googlegroups.com
I thought maybe this would work (in my user.behaviors), but no dice:

     :editor.cljx [(:lt.objs.files/file-types [{:exts [:cljx]
                                                :mime "text/x-clojure"
                                                :name "CljX"
                                                :tags [:editor.clj]}])]

Any advice?

Ethan Sherbondy

unread,
Dec 23, 2013, 5:54:31 PM12/23/13
to light-table...@googlegroups.com
Also attempted:
:editor.cljx [(:lt.object/add-tag :editor.clj)]

I essentially want it to behave just like a clojure editor.

Ethan Sherbondy

unread,
Dec 23, 2013, 6:02:51 PM12/23/13
to light-table...@googlegroups.com
Ah, finally figured out a way, but it required modifying default.behaviors, which is probably suboptimal. Any suggestions for a user-only change?
Here's what I did, for what it's worth. Inside of :files -> :saved-files -> :file-types:

{:name "CljX" :exts [:cljx] :mime "text/x-clojure" :tags [:editor.clj :editor.clojure]}

But this required quitting and relaunching Light Table to take effect. I thought behaviors were supposed to reload while the program was running?

Chris Granger

unread,
Dec 23, 2013, 6:54:30 PM12/23/13
to light-table...@googlegroups.com
All you should need to do is this:

     :files [(:lt.objs.files/file-types [{:exts [:cljx],
                                          :mime "text/x-clojure",
                                          :name "CljX",
                                          :tags [:editor.clj :editor.clojure]}])]

Shouldn't require a restart either. You'll have to reopen the file or set the syntax.

Cheers,
Chris.


--
You received this message because you are subscribed to the Google Groups "Light Table Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to light-table-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

matth...@icloud.com

unread,
Mar 14, 2015, 4:58:44 PM3/14/15
to light-table...@googlegroups.com
Can someone post an example using the new flat file structure?

Cheers,
Chris.


To unsubscribe from this group and stop receiving emails from it, send an email to light-table-discussion+unsub...@googlegroups.com.
Message has been deleted

Matthew Ratzke

unread,
Mar 14, 2015, 6:29:37 PM3/14/15
to light-table...@googlegroups.com
Thanks!

George Oliver

unread,
Mar 14, 2015, 6:30:34 PM3/14/15
to light-table...@googlegroups.com


On Saturday, March 14, 2015 at 1:58:44 PM UTC-7, matth...@icloud.com wrote:
Can someone post an example using the new flat file structure?

It looks like 

 [:files :lt.objs.files/file-types [{:exts [:c], :mime "text/x-c", :tags [:editor.c], :name "C"}]]

(sorry forgot a closing bracket)
Reply all
Reply to author
Forward
0 new messages