1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-24 12:02:15 +03:00
kakoune/rc/base/clojure.kak

43 lines
1.2 KiB
Plaintext
Raw Normal View History

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?) %{
2014-07-21 03:10:01 +04:00
set buffer filetype clojure
}
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
2017-01-04 03:07:45 +03:00
add-highlighter -group / group clojure
2014-07-21 03:10:01 +04:00
2017-01-04 03:07:45 +03:00
add-highlighter -group /clojure ref lisp
2014-07-21 03:10:01 +04:00
2017-01-04 03:07:45 +03:00
add-highlighter -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
2014-07-21 03:10:01 +04:00
# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
2017-01-04 03:07:45 +03:00
hook -group clojure-highlight global WinSetOption filetype=clojure %{ add-highlighter 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
2014-07-21 03:10:01 +04:00
]
2017-01-04 03:07:45 +03:00
hook -group clojure-highlight global WinSetOption filetype=(?!clojure).* %{ remove-highlighter clojure }
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
}