mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-01 08:23:05 +03:00
f085e43bf9
* ModeChange hooks that remove indent now belong to *-trim-indent groups, instead of just -indent * *-filter-around-selections hooks and commands have been renamed to trim-indent for clarity
46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
# http://sass-lang.com
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
# require css.kak
|
|
|
|
# Detection
|
|
# ‾‾‾‾‾‾‾‾‾
|
|
|
|
hook global BufCreate .*[.](scss) %{
|
|
set-option buffer filetype scss
|
|
}
|
|
|
|
# Highlighters
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
add-highlighter shared/scss regions
|
|
add-highlighter shared/scss/core default-region group
|
|
add-highlighter shared/scss/comment region // $ fill comment
|
|
|
|
add-highlighter shared/scss/core/ ref css
|
|
add-highlighter shared/scss/core/ regex @[A-Za-z][A-Za-z0-9_-]* 0:meta
|
|
|
|
# Commands
|
|
# ‾‾‾‾‾‾‾‾
|
|
|
|
define-command -hidden scss-trim-indent css-trim-indent
|
|
define-command -hidden scss-indent-on-new-line css-indent-on-new-line
|
|
define-command -hidden scss-indent-on-closing-curly-brace css-indent-on-closing-curly-brace
|
|
|
|
# Initialization
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
hook -group scss-highlight global WinSetOption filetype=scss %{
|
|
add-highlighter window/scss ref scss
|
|
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/scss }
|
|
}
|
|
|
|
hook global WinSetOption filetype=scss %[
|
|
hook window ModeChange insert:.* -group scss-trim-indent scss-trim-indent
|
|
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 '_' '-'
|
|
|
|
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window scss-.+ }
|
|
]
|