summaryrefslogtreecommitdiff
path: root/src/array_view.hh
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2020-01-08 12:22:34 +0100
committerFrank LENORMAND <lenormf@gmail.com>2020-01-08 12:22:34 +0100
commit5dc4ce528192847bdcd4c9439c66b09b87912654 (patch)
tree0b554535caa27f18ddf76ec06d94f910ba22738d /src/array_view.hh
parentb37638dda4531efd5953ec12a0331bcb0876ada3 (diff)
rc jinja: Highlight Jinja statements/expressions
This commit implements a standalone shared highlighter group that highlights Jinja statements and expressions. The traditional way of highlighting file contents is to hook on the file extension, and assign a custom filetype/highlighter group to the current buffer. However, since Jinja templates can be based on any text file format in existence, we do not have a specific file extension to hook, and consequently, no custom "jinja" filetype. The user is expected to add the `jinja` highlighter whenever required: ``` require-module jinja add-highlighter window/ ref jinja ``` Alternatively, file extensions that are known to occasionally pair with Jinja can be hooked from the user configuration: ``` hook global WinCreate .+\.html %[ try %[ execute-keys -draft \%s \{%|\{\{ <ret> require-module jinja add-highlighter window/ ref jinja ] ] ``` The above hook auto-detects statements/expressions (respectively {%…%} and {{…}} expansions), but will cause false positives (in terms of highlighting), and therefore isn't part of `jinja.kak` by default.
Diffstat (limited to 'src/array_view.hh')
0 files changed, 0 insertions, 0 deletions