1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-02 23:21:15 +03:00
kakoune/rc/filetype/scss.kak

53 lines
1.5 KiB
Plaintext
Raw Normal View History

2014-07-21 03:00:59 +04:00
# http://sass-lang.com
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*[.](scss) %{
set-option buffer filetype scss
2014-07-21 03:00:59 +04:00
}
# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
hook global WinSetOption filetype=scss %[
2019-03-14 00:00:59 +03:00
require-module scss
hook window ModeChange pop: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-.+ }
]
hook -group scss-highlight global WinSetOption filetype=scss %{
add-highlighter window/scss ref scss
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/scss }
2019-03-14 00:00:59 +03:00
}
2019-03-14 00:00:59 +03:00
provide-module scss %[
require-module css
2014-07-21 03:00:59 +04:00
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter shared/scss regions
add-highlighter shared/scss/core default-region group
add-highlighter shared/scss/comment region // $ fill comment
2014-07-21 03:00:59 +04: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
# ‾‾‾‾‾‾‾‾
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
2014-07-21 03:00:59 +04:00
2019-03-14 00:00:59 +03:00
]