1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-29 01:24:52 +03:00
kakoune/rc/base/clojure.kak
Maxime Coste 5ad4499503 Fix naming conventions in bundled scripts
Do not use _ prefix for hidden commands, use - as a word separator
in command names.
2017-01-13 01:00:43 +00:00

43 lines
1.2 KiB
Plaintext

# http://clojure.org
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
# require lisp.kak
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*[.](cljs?) %{
set buffer filetype clojure
}
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter -group / group clojure
add-highlighter -group /clojure ref lisp
add-highlighter -group /clojure regex \b(clojure.core/['/\w]+)\b 0:keyword
# Commands
# ‾‾‾‾‾‾‾‾
def -hidden clojure-filter-around-selections lisp-filter-around-selections
def -hidden clojure-indent-on-new-line lisp-indent-on-new-line
# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
hook -group clojure-highlight global WinSetOption filetype=clojure %{ add-highlighter ref clojure }
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
]
hook -group clojure-highlight global WinSetOption filetype=(?!clojure).* %{ remove-highlighter clojure }
hook global WinSetOption filetype=(?!clojure).* %{
remove-hooks window clojure-indent
remove-hooks window clojure-hooks
}