Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
collapsible exceptions added in a new namespace.
Browse files Browse the repository at this point in the history
README updated. collapsible.exception TAG added
  • Loading branch information
carocad committed Mar 16, 2016
1 parent faa4b89 commit b744f0c
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 1,453 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ By default, \*.cljc files are identified as Clojure files. Thus when you eval, i
Clojure file. If you'd like to eval as a ClojureScript file, run the command `Editor: Set current
editor syntax`, select `ClojureScript` and then eval.

## Clojure(script) error messages
Currently this plugin supports an experimental feature that allows to change the default exception behavior (showing the complete stacktrace) to an expandable version of the same. Some screenshots of the new behavior can be found [here](https://github.com/LightTable/Clojure/issues/77).
To use the new behavior go to ```User behaviors``` and add the following lines :

```Clojure
; for Clojure
[:editor.clj :-lt.plugins.clojure/clj-exception]
[:editor.clj :lt.plugins.clojure.collapsible-exception/clj-expandable-exception]

; for Clojurescript
[:editor.cljs :-lt.plugins.clojure/cljs-exception]
[:editor.cljs :lt.plugins.clojure.collapsible-exception/cljs-expandable-exception]
```

## First ClojureScript Repl

Welcome first time ClojureScript users! Please see [David Nolen's tutorial](https://github.com/swannodette/lt-cljs-tutorial) to get familiar with ClojureScript and comfortable with LightTable's repl. Note while doing that tutorial you were in a namespace. A namespace is necessary for a LightTable repl. Once you have finished the tutorial, create your own ClojureScript project with `lein new mies my-project` and eval there. If you want to add dependencies to your project, read the [below section](#clojurescript-eval) as that requires a different type of LightTable connection.
Expand Down
14 changes: 14 additions & 0 deletions clojure.behaviors
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,18 @@

[:sidebar.docs.search :lt.plugins.clojure/clj-doc-search]
[:sidebar.docs.search :lt.plugins.clojure/cljs-doc-search]

; collapsible stacktrace
[:editor.clj.common :lt.plugins.clojure.collapsible-exception/expandable-exceptions]
; new :collapsible.exception TAG
[:collapsible.exception :lt.objs.menu/menu!]
[:collapsible.exception :lt.objs.eval/ex-menu+]
[:collapsible.exception :lt.objs.eval/ex-clear]
[:collapsible.exception :lt.objs.eval/expand-on-click]
[:collapsible.exception :lt.objs.eval/shrink-on-double-click]
[:collapsible.exception :lt.objs.eval/destroy-on-cleared]
;[:inline.exception :lt.objs.eval/copy-exception]
;NOTE: currently this copies the complete stacktrace but what about just
; copying the summary?
[:collapsible.exception :lt.objs.eval/copy-result]
]
Loading

0 comments on commit b744f0c

Please sign in to comment.