1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 15:04:43 +00:00

adding highlighter for kakoune

This commit is contained in:
deadc0de6
2021-03-31 18:03:14 +02:00
parent f57790e72d
commit 8d5b19a60f
2 changed files with 21 additions and 0 deletions

3
highlighters/README.md Normal file
View File

@@ -0,0 +1,3 @@
Highlighters for dotdrop templates
* [kakoune](https://kakoune.org/) -> [dotdrop.kak](/highlighters/kakoune/dotdrop.kak) (see #305)

View File

@@ -0,0 +1,18 @@
hook global WinCreate .* %{
require-module python
add-highlighter window/dotdrop regions
add-highlighter window/dotdrop/expression region '\{\{@[@]' '[@]@\}\}' group
add-highlighter window/dotdrop/statement region '\{%@[@]' '[@]@%\}' group
add-highlighter window/dotdrop/comment region '\{#@[@]' '[@]@#\}' fill comment
add-highlighter window/dotdrop/expression/ fill variable
add-highlighter window/dotdrop/statement/ fill variable
add-highlighter window/dotdrop/expression/ ref python
add-highlighter window/dotdrop/statement/ ref python
add-highlighter window/dotdrop/expression/ regex '\{\{@[@]|[@]@\}\}' 0:block
add-highlighter window/dotdrop/statement/ regex '\{%@[@]|[@]@%\}' 0:block
add-highlighter window/dotdrop/statement/ regex 'endfor|endif' 0:keyword
}