2014-07-21 03:10:01 +04:00
|
|
|
# http://clojure.org
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
|
|
|
# require lisp.kak
|
|
|
|
|
|
|
|
# Detection
|
|
|
|
# ‾‾‾‾‾‾‾‾‾
|
|
|
|
|
2015-06-06 12:41:47 +03:00
|
|
|
hook global BufCreate .*[.](cljs?) %{
|
2017-11-03 10:34:41 +03:00
|
|
|
set-option buffer filetype clojure
|
2014-07-21 03:10:01 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# Highlighters
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
2018-06-30 02:49:57 +03:00
|
|
|
add-highlighter shared/clojure group
|
2014-07-21 03:10:01 +04:00
|
|
|
|
2018-06-30 02:49:57 +03:00
|
|
|
add-highlighter shared/clojure/ ref lisp
|
2014-07-21 03:10:01 +04:00
|
|
|
|
2018-06-30 02:49:57 +03:00
|
|
|
add-highlighter shared/clojure/ regex \b(clojure.core/['/\w]+)\b 0:keyword
|
2014-07-21 03:10:01 +04:00
|
|
|
|
|
|
|
# Commands
|
|
|
|
# ‾‾‾‾‾‾‾‾
|
|
|
|
|
2017-11-03 10:34:41 +03:00
|
|
|
define-command -hidden clojure-filter-around-selections lisp-filter-around-selections
|
|
|
|
define-command -hidden clojure-indent-on-new-line lisp-indent-on-new-line
|
2014-07-21 03:10:01 +04:00
|
|
|
|
|
|
|
# Initialization
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
2018-06-30 02:49:57 +03:00
|
|
|
hook -group clojure-highlight global WinSetOption filetype=clojure %{ add-highlighter window/clojure ref clojure }
|
2014-07-21 03:10:01 +04:00
|
|
|
|
|
|
|
hook global WinSetOption filetype=clojure %[
|
2018-01-21 02:35:05 +03:00
|
|
|
hook window ModeChange insert:.* -group clojure-hooks clojure-filter-around-selections
|
2017-01-13 03:56:30 +03:00
|
|
|
hook window InsertChar \n -group clojure-indent clojure-indent-on-new-line
|
2014-07-21 03:10:01 +04:00
|
|
|
]
|
|
|
|
|
2017-10-28 06:00:51 +03:00
|
|
|
hook -group clojure-highlight global WinSetOption filetype=(?!clojure).* %{ remove-highlighter window/clojure }
|
2016-09-28 09:45:01 +03:00
|
|
|
|
2014-07-21 03:10:01 +04:00
|
|
|
hook global WinSetOption filetype=(?!clojure).* %{
|
2017-01-04 03:07:45 +03:00
|
|
|
remove-hooks window clojure-indent
|
|
|
|
remove-hooks window clojure-hooks
|
2014-07-21 03:10:01 +04:00
|
|
|
}
|