2014-07-21 03:10:01 +04:00
|
|
|
# http://clojure.org
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
|
|
|
# require lisp.kak
|
|
|
|
|
|
|
|
# Detection
|
|
|
|
# ‾‾‾‾‾‾‾‾‾
|
|
|
|
|
|
|
|
hook global BufSetOption mimetype=text/x-clojure %{
|
|
|
|
set buffer filetype clojure
|
|
|
|
}
|
|
|
|
|
2015-06-06 12:41:47 +03:00
|
|
|
hook global BufCreate .*[.](cljs?) %{
|
2014-07-21 03:10:01 +04:00
|
|
|
set buffer filetype clojure
|
|
|
|
}
|
|
|
|
|
|
|
|
# Highlighters
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
|
|
|
addhl -group / group clojure
|
|
|
|
|
|
|
|
addhl -group /clojure ref lisp
|
|
|
|
|
2016-04-21 22:43:17 +03:00
|
|
|
addhl -group /clojure regex \b(clojure.core/['/\w]+)\b 0:keyword
|
2014-07-21 03:10:01 +04:00
|
|
|
|
|
|
|
# Commands
|
|
|
|
# ‾‾‾‾‾‾‾‾
|
|
|
|
|
|
|
|
def -hidden _clojure_filter_around_selections _lisp_filter_around_selections
|
|
|
|
def -hidden _clojure_indent_on_new_line _lisp_indent_on_new_line
|
|
|
|
|
|
|
|
# Initialization
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
2016-09-25 16:15:07 +03:00
|
|
|
hook -group clojure-highlight global WinSetOption filetype=clojure %{ addhl ref clojure }
|
2014-07-21 03:10:01 +04:00
|
|
|
|
|
|
|
hook global WinSetOption filetype=clojure %[
|
|
|
|
hook window InsertEnd .* -group clojure-hooks _clojure_filter_around_selections
|
|
|
|
hook window InsertChar \n -group clojure-indent _clojure_indent_on_new_line
|
|
|
|
]
|
|
|
|
|
2016-09-28 09:45:01 +03:00
|
|
|
hook -group clojure-highlight WinSetOption filetype=(?!clojure).* %{ rmhl clojure }
|
|
|
|
|
2014-07-21 03:10:01 +04:00
|
|
|
hook global WinSetOption filetype=(?!clojure).* %{
|
|
|
|
rmhooks window clojure-indent
|
|
|
|
rmhooks window clojure-hooks
|
|
|
|
}
|