2014-07-21 03:00:59 +04:00
|
|
|
# http://sass-lang.com
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
|
|
|
# require css.kak
|
|
|
|
|
|
|
|
# Detection
|
|
|
|
# ‾‾‾‾‾‾‾‾‾
|
|
|
|
|
|
|
|
hook global BufCreate .*[.](scss) %{
|
2017-11-03 10:34:41 +03:00
|
|
|
set-option buffer filetype scss
|
2014-07-21 03:00:59 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# Highlighters
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
2018-07-01 12:53:35 +03:00
|
|
|
add-highlighter shared/scss regions
|
|
|
|
add-highlighter shared/scss/core default-region group
|
2018-07-02 13:59:12 +03:00
|
|
|
add-highlighter shared/scss/comment region // $ fill comment
|
2014-07-21 03:00:59 +04:00
|
|
|
|
2018-07-01 12:53:35 +03:00
|
|
|
add-highlighter shared/scss/core/ ref css
|
|
|
|
add-highlighter shared/scss/core/ regex @[A-Za-z][A-Za-z0-9_-]* 0:meta
|
2014-07-21 03:00:59 +04:00
|
|
|
|
|
|
|
# Commands
|
|
|
|
# ‾‾‾‾‾‾‾‾
|
|
|
|
|
2017-11-03 10:34:41 +03:00
|
|
|
define-command -hidden scss-filter-around-selections css-filter-around-selections
|
|
|
|
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
|
2014-07-21 03:00:59 +04:00
|
|
|
|
|
|
|
# Initialization
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
2018-07-01 12:53:35 +03:00
|
|
|
hook -group scss-highlight global WinSetOption filetype=scss %{ add-highlighter window/scss ref scss }
|
2014-07-21 03:00:59 +04:00
|
|
|
|
2016-09-25 16:15:07 +03:00
|
|
|
hook global WinSetOption filetype=scss %[
|
2018-01-21 02:35:05 +03:00
|
|
|
hook window ModeChange insert:.* -group scss-hooks scss-filter-around-selections
|
2017-01-13 03:56:30 +03:00
|
|
|
hook window InsertChar \n -group scss-indent scss-indent-on-new-line
|
|
|
|
hook window InsertChar \} -group scss-indent scss-indent-on-closing-curly-brace
|
2018-03-21 09:59:40 +03:00
|
|
|
set-option buffer extra_word_chars '-'
|
2014-07-21 03:00:59 +04:00
|
|
|
]
|
|
|
|
|
2017-10-28 06:00:51 +03:00
|
|
|
hook -group scss-highlight global WinSetOption filetype=(?!scss).* %{ remove-highlighter window/scss }
|
2016-09-28 09:45:01 +03:00
|
|
|
|
2014-07-21 03:00:59 +04:00
|
|
|
hook global WinSetOption filetype=(?!scss).* %{
|
2017-01-04 03:07:45 +03:00
|
|
|
remove-hooks window scss-indent
|
|
|
|
remove-hooks window scss-hooks
|
2014-07-21 03:00:59 +04:00
|
|
|
}
|