From 086db6a9d3fa3e3a605c432ba99dccf705aa2d3f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 28 Nov 2018 18:13:55 +1100 Subject: [PATCH] Fix extra_word_chars in various scripts Add '_' to the list now that it is not built-in anymore --- rc/base/clojure.kak | 2 +- rc/base/css.kak | 2 +- rc/base/haskell.kak | 2 +- rc/core/kakrc.kak | 4 ++-- rc/extra/sass.kak | 2 +- rc/extra/scheme.kak | 2 +- rc/extra/scss.kak | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rc/base/clojure.kak b/rc/base/clojure.kak index b82aefc5..cde4fc95 100644 --- a/rc/base/clojure.kak +++ b/rc/base/clojure.kak @@ -23,7 +23,7 @@ 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 . / * ? + - < > ! : "'" + set-option window extra_word_chars '_' . / * ? + - < > ! : "'" } evaluate-commands %sh{ diff --git a/rc/base/css.kak b/rc/base/css.kak index 0b250df2..d557d2cd 100644 --- a/rc/base/css.kak +++ b/rc/base/css.kak @@ -67,7 +67,7 @@ hook global WinSetOption filetype=css %[ hook window ModeChange insert:.* -group css-hooks css-filter-around-selections hook window InsertChar \n -group css-indent css-indent-on-new-line hook window InsertChar \} -group css-indent css-indent-on-closing-curly-brace - set-option buffer extra_word_chars '-' + set-option buffer extra_word_chars '_' '-' ] hook -group css-highlight global WinSetOption filetype=(?!css).* %{ remove-highlighter window/css } diff --git a/rc/base/haskell.kak b/rc/base/haskell.kak index 2e5c2f0e..d3ad2215 100644 --- a/rc/base/haskell.kak +++ b/rc/base/haskell.kak @@ -94,7 +94,7 @@ define-command -hidden haskell-indent-on-new-line %{ hook -group haskell-highlight global WinSetOption filetype=haskell %{ add-highlighter window/haskell ref haskell } hook global WinSetOption filetype=haskell %{ - set-option window extra_word_chars "'" + set-option window extra_word_chars '_' "'" hook window ModeChange insert:.* -group haskell-hooks haskell-filter-around-selections hook window InsertChar \n -group haskell-indent haskell-indent-on-new-line } diff --git a/rc/core/kakrc.kak b/rc/core/kakrc.kak index 8236ce12..5115a9e9 100644 --- a/rc/core/kakrc.kak +++ b/rc/core/kakrc.kak @@ -45,7 +45,7 @@ evaluate-commands %sh{ # Add the language's grammar to the static completion list printf '%s\n' "hook global WinSetOption filetype=kak %{ set-option window static_words $(join "${keywords} ${attributes} ${types} ${values}" ' ')' - set-option -- window extra_word_chars '-' + set-option -- window extra_word_chars '_' '-' }" # Highlight keywords (which are always surrounded by whitespace) @@ -100,7 +100,7 @@ hook global WinSetOption filetype=kak %~ hook window InsertChar (?![[{(<>)}\]])[^\s\w] -group kak-indent kak-indent-on-closing-char # cleanup trailing whitespaces on current line insert end hook window ModeChange insert:.* -group kak-indent %{ try %{ execute-keys -draft \; s ^\h+$ d } } - set-option buffer extra_word_chars '-' + set-option buffer extra_word_chars '_' '-' ~ hook -group kak-highlight global WinSetOption filetype=(?!kak).* %{ remove-highlighter window/kakrc } diff --git a/rc/extra/sass.kak b/rc/extra/sass.kak index 863ec6e7..df4929fa 100644 --- a/rc/extra/sass.kak +++ b/rc/extra/sass.kak @@ -53,7 +53,7 @@ hook -group sass-highlight global WinSetOption filetype=sass %{ add-highlighter hook global WinSetOption filetype=sass %{ hook window ModeChange insert:.* -group sass-hooks sass-filter-around-selections hook window InsertChar \n -group sass-indent sass-indent-on-new-line - set-option buffer extra_word_chars '-' + set-option buffer extra_word_chars '_' '-' } hook -group sass-highlight global WinSetOption filetype=(?!sass).* %{ remove-highlighter window/sass } diff --git a/rc/extra/scheme.kak b/rc/extra/scheme.kak index c3cd8a4b..df7510e2 100644 --- a/rc/extra/scheme.kak +++ b/rc/extra/scheme.kak @@ -121,7 +121,7 @@ hook -group scheme-highlight global WinSetOption filetype=(?!scheme).* %{ } hook global WinSetOption filetype=scheme %{ - set-option -add buffer extra_word_chars %{-:!:%:?:<:>:=} + set-option buffer extra_word_chars '_' '-' '!' '%' '?' '<' '>' '=' hook window InsertEnd .* -group scheme-hooks lisp-filter-around-selections hook window InsertChar \n -group scheme-indent lisp-indent-on-new-line } diff --git a/rc/extra/scss.kak b/rc/extra/scss.kak index 9e4e7cd9..9dbd1fe3 100644 --- a/rc/extra/scss.kak +++ b/rc/extra/scss.kak @@ -36,7 +36,7 @@ hook global WinSetOption filetype=scss %[ hook window ModeChange insert:.* -group scss-hooks scss-filter-around-selections hook window InsertChar \n -group scss-indent scss-indent-on-new-line hook window InsertChar \} -group scss-indent scss-indent-on-closing-curly-brace - set-option buffer extra_word_chars '-' + set-option buffer extra_word_chars '_' '-' ] hook -group scss-highlight global WinSetOption filetype=(?!scss).* %{ remove-highlighter window/scss }