Help me Contribute to Light Table

137 views
Skip to first unread message

Erik Griffin

unread,
Feb 25, 2015, 4:52:52 PM2/25/15
to light-table...@googlegroups.com
Hello everyone.  

I have been following Light Table from the beginning, and have finally taken up programming to actually use it.

I am very new to all of this, but I believe in making the tools that are useful to yourself.  Currently I am working with deploying ruby code via sinatra to the web.  Thus I am working with .erb files that Light Table does not inherently recognize.  I know I can change the syntax editor to HTML and will get some styling, but it does not handle the <% %> tags well and as a result shows errors in the HTML where there are none.
Also the indenting is quite annoying, I would like to set that as well.

Unfortunately I have no idea where to even begin creating something that would help lighttable deal with the .erb extension, can someone nudge me in the right direction?

PS: Was so happy to see an update form Chris posted very recently.

Sean Corfield

unread,
Feb 25, 2015, 5:22:51 PM2/25/15
to light-table...@googlegroups.com
On Feb 25, 2015, at 1:52 PM, Erik Griffin <griffi...@gmail.com> wrote:
I am very new to all of this, but I believe in making the tools that are useful to yourself.  Currently I am working with deploying ruby code via sinatra to the web.  Thus I am working with .erb files that Light Table does not inherently recognize.  I know I can change the syntax editor to HTML and will get some styling, but it does not handle the <% %> tags well and as a result shows errors in the HTML where there are none.
Also the indenting is quite annoying, I would like to set that as well.

I suspect a fair bit of that is CodeMirror itself — the open source editor embedded in LightTable. Looks like a known issue that was fixed in CM’s master just recently?


Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)



Erik Griffin

unread,
Feb 25, 2015, 5:43:07 PM2/25/15
to light-table...@googlegroups.com
Does that mean that it will simply be fixed in the next build of LightTable?

Sean Corfield

unread,
Feb 25, 2015, 5:48:22 PM2/25/15
to light-table...@googlegroups.com
On Feb 25, 2015, at 2:43 PM, Erik Griffin <griffi...@gmail.com> wrote:
> Does that mean that it will simply be fixed in the next build of LightTable?

Once the CM fix is released, LT would be able to accept a Pull Request to update to the latest CM…

Erik Griffin

unread,
Feb 26, 2015, 11:01:58 AM2/26/15
to light-table...@googlegroups.com
In the meantime, is it possible to adjust the HTML syntax editor to indent only 2 spaces? Or is that completely tied to Code Mirror

Sean Corfield

unread,
Feb 26, 2015, 12:37:18 PM2/26/15
to light-table...@googlegroups.com
On Feb 26, 2015, at 8:01 AM, Erik Griffin <griffi...@gmail.com> wrote:
> In the meantime, is it possible to adjust the HTML syntax editor to indent only 2 spaces? Or is that completely tied to Code Mirror

That’s configurable in user.behaviors. You can change it per editor. You’ll need to bind an editor type to the file extension if it isn’t already bound. Here’s what I have:

[:editor.html :lt.objs.editor/wrap]
[:editor.html :lt.objs.editor/tab-settings false 4 4]

[:editor.javascript :lt.objs.editor/wrap]
[:editor.javascript :lt.objs.editor/tab-settings false 4 4]

[:editor.styl :lt.objs.editor/tab-settings true 4 4]

[:files :lt.objs.files/file-types [{:exts [:cfm], :mime "htmlmixed", :tags [:editor.html], :name "coldfusion"}
{:exts [:cfc], :mime "text/javascript", :tags [:editor.javascript], :name "component"}
{:exts [:cljx], :mime "text/x-clojure", :tags [:editor.clj :editor.clojure], :name "clojurex"}
{:exts [:fr], :mime "text/x-haskell", :tags [:editor.haskell], :name "frege"}
{:exts [:gwn], :mime "text/x-clojure", :tags [:editor.clj :editor.clojure], :name "gershwin"}
{:exts [:elm], :mime "text/x-haskell", :tags [:editor.haskell], :name "elm"}]]

Erik Griffin

unread,
Feb 27, 2015, 4:48:01 AM2/27/15
to light-table...@googlegroups.com
Awesome thanks! I'll have a look today

--
You received this message because you are subscribed to a topic in the Google Groups "Light Table Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/light-table-discussion/OXA63iPeuYQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to light-table-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages