Skip to content

Commit

Permalink
Merge pull request #95 from migraine-user/add-format
Browse files Browse the repository at this point in the history
add formatting by Tab
  • Loading branch information
oxalorg authored Sep 27, 2024
2 parents 165493c + a50fa9d commit f446663
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/app/editor.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
#js [(cm-clj/syntax live-grammar/parser)
(.slice editor-extensions-to-load 1)]
editor-extensions-to-load))
;; enable formatting by Tab key
(.of view/keymap (.filter cm-clj/complete-keymap #(= "Tab" (aget % "key"))))
#_(.of view/keymap cm-clj/complete-keymap)
#_(.of view/keymap historyKeymap)])))

Expand Down
4 changes: 2 additions & 2 deletions src/app/problem.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@
(reset! editor-extension-mode extension-mode))]]
[:p {:style {:margin-top "1rem"}}
[:small
"Alt+Enter will eval the local form in the editor box above. There are
"Alt+Enter will eval the local form in the editor box above, and Tab will format the code. There are
lots of nifty such features and keybindings. More docs coming soon! (Try
playing with alt + arrows / ctrl + enter) in the meanwhile.
playing with alt + arrows / ctrl + enter / tab) in the meanwhile.
For documentation try e.g. (doc map)."]]
[modal/box {:is-open success-modal-is-open
:on-close success-modal-on-close}
Expand Down

0 comments on commit f446663

Please sign in to comment.