mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-26 04:52:53 +03:00
Merge remote-tracking branch 'eraserhd/pr/master/extra_word_chars-on-window'
This commit is contained in:
commit
f2e5582f34
@ -235,7 +235,8 @@ are exclusively available to built-in options.
|
||||
|
||||
*extra_word_chars* `codepoint-list`::
|
||||
a list of all additional codepoints that should be considered
|
||||
as word character.
|
||||
as word character. This must be set on the buffer, not the window,
|
||||
for word completion to offer words containing these codepoints.
|
||||
|
||||
*matching_pairs* `codepoint-list`::
|
||||
_default_ ( ) { } [ ] < > +
|
||||
|
@ -10,16 +10,10 @@ hook global BufCreate .*[.](clj|cljc|cljs|cljx|edn) %{
|
||||
|
||||
# Initialization
|
||||
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
hook global WinSetOption filetype=clojure %[
|
||||
hook global WinSetOption filetype=clojure %{
|
||||
require-module clojure
|
||||
|
||||
set-option window static_words %opt{clojure_static_words}
|
||||
|
||||
hook window ModeChange insert:.* -group clojure-trim-indent clojure-trim-indent
|
||||
hook window InsertChar \n -group clojure-indent clojure-indent-on-new-line
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window clojure-.+ }
|
||||
]
|
||||
clojure-configure-window
|
||||
}
|
||||
|
||||
hook -group clojure-highlight global WinSetOption filetype=clojure %{
|
||||
add-highlighter window/clojure ref clojure
|
||||
@ -48,10 +42,6 @@ add-highlighter shared/clojure/code/ regex \b(nil|true|false)\b 0:value
|
||||
add-highlighter shared/clojure/code/ regex \
|
||||
\\(?:space|tab|newline|return|backspace|formfeed|u[0-9a-fA-F]{4}|o[0-3]?[0-7]{1,2}|.)\b 0:string
|
||||
|
||||
hook global WinSetOption filetype=clojure %{
|
||||
set-option window extra_word_chars '_' . / * ? + - < > ! : "'"
|
||||
}
|
||||
|
||||
evaluate-commands %sh{
|
||||
exec awk -f - <<'EOF'
|
||||
BEGIN{
|
||||
@ -188,6 +178,16 @@ EOF
|
||||
# Commands
|
||||
# ‾‾‾‾‾‾‾‾
|
||||
|
||||
define-command -hidden clojure-configure-window %{
|
||||
set-option window static_words %opt{clojure_static_words}
|
||||
|
||||
hook window ModeChange insert:.* -group clojure-trim-indent clojure-trim-indent
|
||||
hook window InsertChar \n -group clojure-indent clojure-indent-on-new-line
|
||||
|
||||
set-option buffer extra_word_chars '_' . / * ? + - < > ! : "'"
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window clojure-.+ }
|
||||
}
|
||||
|
||||
define-command -hidden clojure-trim-indent lisp-trim-indent
|
||||
|
||||
declare-option \
|
||||
|
@ -14,7 +14,7 @@ hook global BufCreate .*[.](hs) %{
|
||||
hook global WinSetOption filetype=haskell %{
|
||||
require-module haskell
|
||||
|
||||
set-option window extra_word_chars '_' "'"
|
||||
set-option buffer extra_word_chars '_' "'"
|
||||
hook window ModeChange insert:.* -group haskell-trim-indent haskell-trim-indent
|
||||
hook window InsertChar \n -group haskell-indent haskell-indent-on-new-line
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user