purpleanna.blogg.se

Light table plugins
Light table plugins









Then scroll back to the behaviour and evaluate that.First scroll to the top of the User.cljs file and put the cursor inside the ns form and then evaluate that.(The message will by default be displayed for 10 seconds)Īssuming you have already gone through the command example in the previous example you need to: Finally we use the set-msg! function from the lt.objs.notifos namespace to set a message with the editors file name in the bottom status bar in Light Table.You'll also notice we'veĪssumed a parameter ed, ie we are expecting this behavior function to be called with an editor object. The reaction, defines the function that should be executed when the behavior is triggered.Triggers are the definition of event name(s) that should trigger this behavior to execute.This is optional, but it's nice for documentation and you'll see that it's also helpful when we wire it up in the next section.We are going to need this id to be able to configure when this behavior should be triggered

light table plugins

The are the easiest place to start, so let's go ahead and make our own little command. They are typically listed in the Command Pane and you can assign keyboard shortcuts to them. Run the command User: Say Hello to see your own command in action ! Adding your own commandĬommands are the user facing functionality in Light Table. Inside the default user.cljs is an example command and behavior.To open your user.cljs at anytime use the command Settings: User script.To write commands, behaviors and more, see src/lt/plugins/user.cljs.Any custom keybindings and behaviors are added to user.keymap and user.behaviors.add it to your workspace with the command Settings: Add User plugin to workspace.git and uploading it to a service like Github. Since the User plugin is just a directory, you can share it by putting it under revision control e.g. Your complete configuration, including plugins you've installed, is stored in a User plugin. Windows: %APPDATALOCAL%\/LightTable\/User.Mac: ~\/Library\/Application\ Support\/LightTable\/User.The location of the user plugin depends on your OS We're going to walk through a couple of simple examples. The simplest way to get started developing something for Light Table is to play with the User plugin.











Light table plugins