From 605d0a87b1cdd50e2eec1607c186a0e5a4887a19 Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Fri, 10 Apr 2026 19:37:41 +1000 Subject: [PATCH] Update highlighting --- vim/syntax/solstice.vim | 54 ++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/vim/syntax/solstice.vim b/vim/syntax/solstice.vim index c11acd5..4c0561a 100644 --- a/vim/syntax/solstice.vim +++ b/vim/syntax/solstice.vim @@ -5,37 +5,41 @@ if exists("b:current_syntax") endif " Keywords -syn keyword solsticeConditional if -syn keyword solsticeRepeat while -syn keyword solsticeKeyword def struct return use -syn keyword solsticeType int string bool double char -syn keyword solsticeBoolean true false +syn keyword solsKeyword puts if while def lambda return use struct ground +syn keyword solsBool true false -" Built-in functions -syn keyword solsticeBuiltin puts print println input +" Types +syn keyword solsType int double string char bool fun template object -" Data Types -syn match solsticeNumber "\d\+\(\.\d\+\)\=" -syn region solsticeString start=/"/ end=/"/ -syn match solsticeCharacter /'[^']'/ +" Strings and chars +syn region solsString start=/"/ skip=/\\"/ end=/"/ +syn region solsChar start=/'/ skip=/\\'/ end=/'/ + +" Numbers +syn match solsFloat /\<[0-9]\+\.[0-9]*\>/ +syn match solsInt /\<[0-9]\+\>/ " Operators -syn match solsticeOperator "==\|!=\|>=\|<=\|++\|--\|+\=\|-\=\|\*=\|\/=" -syn match solsticeOperator "[><=+\-*/]" +syn match solsOperator /+\|-\|\*\|\/\|=\|!\|>\|<\|+=\|-=\|\*=\|\/=\|++\|--\|==\|!=\|>=\|<=/ " Delimiters -syn match solsticeDelimiter "[{()}]" +syn match solsDelimiter /[{}(),;]/ -hi def link solsticeConditional Conditional -hi def link solsticeRepeat Repeat -hi def link solsticeKeyword Keyword -hi def link solsticeType Type -hi def link solsticeBoolean Boolean -hi def link solsticeBuiltin Function -hi def link solsticeNumber Number -hi def link solsticeString String -hi def link solsticeCharacter Character -hi def link solsticeOperator Operator -hi def link solsticeDelimiter Delimiter +" Comments +syn match solsComment /\/\/.*$/ +syn match solsComment /#.*$/ + +" Highlight links +hi def link solsKeyword Keyword +hi def link solsBool Boolean +hi def link solsType Type +hi def link solsString String +hi def link solsChar Character +hi def link solsFloat Float +hi def link solsInt Number +hi def link solsOperator Operator +hi def link solsDelimiter Delimiter +hi def link solsComment Comment let b:current_syntax = "solstice" +