Hi Max, Quick question, but how were you triggering the command? For instance, via the command pane in the side panel or by a keybinding?
Thanks, Scott On Monday, February 20, 2017 at 11:44:04 AM UTC-5, Max Muranov wrote: > > I think it's a usual sutiation: I haven't found one useful function in the > light table and want to write it myself. It's a simple function and I want > to just put it to user script. > > Found this quick start guide for plugin development: > https://lighttable.gitbooks.io/light-table-developers-guide/content/user-plugin.html > Okay but... What about full documentation? I want to use functions that > are not in this guide. > > I didn't found something similar to functions docs and assumed that I can > find them in the sources. > > > https://github.com/LightTable/LightTable/blob/master/src/lt/objs/editor.cljs > I found a function in this file and tried to do something simpliest: > > (cmd/command {:command :user.say-hello > :desc "User: Say Hello" > :exec (fn [] > (let [ed (lt.objs.editor.pool/last-active)] > (lt.objs.editor/center-cursor @ed)))}) > ;;;;;;;;;;;;(tabs/add-or-focus! hello))}) > > And this causes an exception "TypeError: > lt.objs.editor.__GT_cm_ed.call(...).getCursor is not a function". > > What am I doing wrong? And where can I find something similar to plugin > development docs? Help, I can't understand anything =D > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
