diff options
Diffstat (limited to '.config/nvim/syntax')
| -rw-r--r-- | .config/nvim/syntax/hobbylang.vim | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/.config/nvim/syntax/hobbylang.vim b/.config/nvim/syntax/hobbylang.vim index e1953d0..cb02b5b 100644 --- a/.config/nvim/syntax/hobbylang.vim +++ b/.config/nvim/syntax/hobbylang.vim @@ -3,11 +3,11 @@ if exists("b:current_syntax") endif syn keyword hlStatement break continue return self -syn keyword hlLabel case default +syn keyword hlLabel case syn keyword hlConditional if else match syn keyword hlRepeat while loop for syn keyword hlStructure struct enum var func -syn keyword hlModifier static +syn keyword hlModifier static global syn keyword hlLiteral true false nil syn match hlFunction /\<\h\w*\ze\_s*(/ @@ -16,11 +16,14 @@ syn match hlComment /\/\/.*/ syn match hlType /[^a-z0-9_][A-Z][A-z0-9_]*/ syn match hlNumber /\<\d\+\>/ syn match hlNumber /\<\d\+\.\d*/ -syn match hlOperator /=|\+=|-=|\*=|\/=|%=|\*\*=|\+|-|\*\*|\*|\/|%|<|>|<=|>=|==|!=|!|\.\./ +syn match hlOperator /=|\+=|-=|\*=|\/=|%=|\*\*=|\+|-|\*\*|\*|\/|%|\<|\>|\<=|\>=|==|!=|!|\.\./ -syn region hlString start="\"" end="\"" -syn region hlString start="'" end="'" +syn region hlString start="\"" end="\"" contains=hlEscape +syn region hlString start="'" end="'" contains=hlEscape +syn match hlEscape /\\[ntra"'\\]/ + +hi def link hlEscape Special hi def link hlStructure Structure hi def link hlFunction Function hi def link hlStatement Statement |
