mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-14 13:32:37 +03:00
Improve Hare syntax highlighting
This commit is contained in:
parent
ead10d2f79
commit
b0ac6c8eb4
@ -47,6 +47,9 @@ provide-module hare %§
|
|||||||
add-highlighter shared/hare/code/ regex "\buse\s.*?(?=;)" 0:module
|
add-highlighter shared/hare/code/ regex "\buse\s.*?(?=;)" 0:module
|
||||||
add-highlighter shared/hare/code/ regex "\buse\b" 0:meta
|
add-highlighter shared/hare/code/ regex "\buse\b" 0:meta
|
||||||
|
|
||||||
|
# functions
|
||||||
|
add-highlighter shared/hare/code/ regex "\b([a-zA-Z_]*)\h*\(" 1:function
|
||||||
|
|
||||||
# attributes
|
# attributes
|
||||||
add-highlighter shared/hare/code/ regex "@(offset|init|fini|test|noreturn|symbol)\b" 0:attribute
|
add-highlighter shared/hare/code/ regex "@(offset|init|fini|test|noreturn|symbol)\b" 0:attribute
|
||||||
|
|
||||||
@ -86,10 +89,15 @@ provide-module hare %§
|
|||||||
add-highlighter shared/hare/code/ regex "\b[0-9]+([eE][-+]?[0-9]+)?(f32|f64)\b" 0:value
|
add-highlighter shared/hare/code/ regex "\b[0-9]+([eE][-+]?[0-9]+)?(f32|f64)\b" 0:value
|
||||||
add-highlighter shared/hare/code/ regex "\b[0-9]+([eE][-+]?[0-9]+)?(?=f)" 0:value
|
add-highlighter shared/hare/code/ regex "\b[0-9]+([eE][-+]?[0-9]+)?(?=f)" 0:value
|
||||||
|
|
||||||
|
# constants
|
||||||
|
add-highlighter shared/hare/code/ regex "\b[A-Z0-9_]*\b" 0:value
|
||||||
|
|
||||||
# control flow
|
# control flow
|
||||||
add-highlighter shared/hare/code/ regex "\b(for|if|else|switch|match|return|break|continue|defer|yield|case|static)\b" 0:keyword
|
add-highlighter shared/hare/code/ regex "\b(for|if|else|switch|match|return|break|continue|defer|yield|case|static)\b" 0:keyword
|
||||||
|
|
||||||
|
# operators
|
||||||
|
add-highlighter shared/hare/code/ regex "(=|\+|-|\*|/|<|>|!|\?|&|\||\.\.\.)" 0:operator
|
||||||
|
|
||||||
# commands
|
# commands
|
||||||
define-command -hidden hare-indent-on-new-line %{ evaluate-commands -draft -itersel %{
|
define-command -hidden hare-indent-on-new-line %{ evaluate-commands -draft -itersel %{
|
||||||
# preserve indentation on new lines
|
# preserve indentation on new lines
|
||||||
|
Loading…
Reference in New Issue
Block a user