From eaea1d20f31f964c893a27a1ab6eaa5d2be3b8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Gonz=C3=A1lez?= Date: Wed, 16 Mar 2022 21:55:29 -0500 Subject: [PATCH] Improved indentation, keywords, and variables for scss --- rc/filetype/scss.kak | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rc/filetype/scss.kak b/rc/filetype/scss.kak index 95167e75..744691b0 100644 --- a/rc/filetype/scss.kak +++ b/rc/filetype/scss.kak @@ -15,6 +15,7 @@ hook global WinSetOption filetype=scss %[ require-module scss hook window ModeChange pop:insert:.* -group scss-trim-indent scss-trim-indent + hook window InsertChar \n -group scss-indent scss-insert-on-new-line 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 '_' '-' @@ -37,15 +38,17 @@ require-module css 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/comment region ^\h*// $ fill comment add-highlighter shared/scss/core/ ref css -add-highlighter shared/scss/core/ regex @[A-Za-z][A-Za-z0-9_-]* 0:meta +add-highlighter shared/scss/core/ regex & 0:keyword +add-highlighter shared/scss/core/ regex \$[A-Za-z][A-Za-z0-9_-]* 0:variable # Commands # ‾‾‾‾‾‾‾‾ define-command -hidden scss-trim-indent css-trim-indent +define-command -hidden scss-insert-on-new-line css-insert-on-new-line 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