Skip to content

Instantly share code, notes, and snippets.

@MarcoPolo
Created March 12, 2014 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoPolo/9516997 to your computer and use it in GitHub Desktop.
Save MarcoPolo/9516997 to your computer and use it in GitHub Desktop.
;; User behaviors
;; -----------------------------
;; Behaviors are stored as a set of diffs that are merged together
;; to create the final set of functionality that makes up Light Table. You can
;; modify these diffs to either add or subtract functionality.
;;
;; Behaviors are added to tags, objects with those tags then automatically gain
;; whatever logic the behavior imparts. To see a list of user-level behaviors,
;; start typing a word related to the functionality you want in between the square
;; brackets (e.g. "theme").
{:+ {
;; The app tag is kind of like global scope. You assign behaviors that affect
;; all of Light Table here
:app [:lt.objs.editor.file/remove-trailing-whitespace
:lt.objs.metrics/disable-metrics]
;; The editor tag is applied to all editors
:editor [:lt.objs.editor/no-wrap
:lt.plugins.rainbow/rainbow-parens
:lt.objs.editor/line-numbers
:lt.plugins.vim/activate-vim
(:lt.objs.style/font-settings "Droid Sans Mono" 10 1.2)]
;; Here we can add behaviors to just clojure editors
:editor.clojure [(:lt.objs.langs.clj/print-length 1000)
(:lt.objs.editor/tab-settings false 2 2)]
:files [:lt.objs.opener/save-failed
(:lt.objs.files/file-types [ {:name "Octave" :exts [:m] :mime "text/x-octave" :tags [:editor.octave]}
{:name "Github Markdown" :exts [:md :markdown] :mime "gfm" :tags [:editor.markdown]}])]}
;; You can use the subtract key to remove behavior that may get added by
;; another diff
:- {:app [:lt.objs.intro/show-intro
:lt.objs.metrics/init-metrics]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment