Light Table : parentheses are not auto-closing

1.5k Views Asked by At

I'm trying to edit Clojure/ClojureScript files on Light Table with paredit, but the Plugin does not seem to work. When I open a parenthesis, it is not closed.

However the plugin is installed as shows the plugins list.

Have I missed some configuration step, or is it a bug?

(At the time of writing, I just installed the last version and have not touched the config).

2

There are 2 best solutions below

1
On BEST ANSWER

Since version 0.7.0, auto-closing parens are no longer the default, because of some issues with international keyboards apparently. It is mentioned in this closed issue, as well as in the FAQ.

What I needed to do was add this form to the User behaviors configuration:

[:app :lt.objs.settings/pair-keymap-diffs]

To do so, I followed these steps:

  1. Ctrl-Space to open Commands
  2. Type "user behaviors" and click the proposed command
  3. This open a file that you can edit to add the above snippet.
1
On

Plugin only creates new commands and behaviors. You should configure User keybindings (Press Ctrl+Space and type keybindings) for the plugin like:

[:editor.clj "shift-alt-s" :paredit.select.parent]
[:editor.clj "cmd-shift-," :paredit.shrink.right]
[:editor.clj "alt-s" (:paredit.select.parent "(") :smart-indent-selection :paredit.select.clear]
[:editor.clj "cmd-shift-." :paredit.shrink.left]
[:editor.clj "cmd-shift-0" :paredit.grow.right]
[:editor.clj "alt-enter" (:paredit.select.parent "(") :eval-editor-form :paredit.select.clear]
[:editor.clj "cmd-shift-s" :paredit-plus.split-sexp]
[:editor.clj "cmd-shift-9" :paredit.grow.left]
[:editor.clj "cms-shift-j" :paredit-plus.join-sexps]
[:editor.clj "shift-alt-k" :paredit-plus.kill]

But paredit does not have effect on auto-closing of parens. It is default behavior of Light Table. Check Default behaviors if it contains this line:

[:editor :lt.plugins.auto-paren/close-pair]