Добавлена подстка для GO

This commit is contained in:
svkalinin 2022-07-22 16:01:30 +03:00
parent 5bb2ca218c
commit 5587924bfc
2 changed files with 16 additions and 1 deletions

View File

@ -35,3 +35,6 @@
21/07/2022
- Added Save file dialog before tab was closed
- Added Save file dialog when exiting, if file was modify
22/07/2022
- Added GO highlight

View File

@ -32,7 +32,7 @@ namespace eval Highlight {} {
proc SH {txt} {
ctext::addHighlightClassForRegexp $txt flags orange {-+[a-zA-Z\-_]+}
ctext::addHighlightClass $txt stackControl #19a2a6 {if fi else elseif then while case esac do in exit source echo}
ctext::addHighlightClass $txt stackControl #19a2a6 {if fi else elseif then while case esac do in exit source echo package}
ctext::addHighlightClassWithOnlyCharStart $txt vars #4471ca "\$"
ctext::addHighlightClassForRegexp $txt vars_extended #4471ca {\$\{[a-zA-Z0-9\_\-:\./\$\{\}]+\}}
ctext::addHighlightClass $txt variable_funcs gold {set export}
@ -41,4 +41,16 @@ namespace eval Highlight {} {
ctext::addHighlightClassForRegexp $txt comments #666666 {(#|//)[^\n\r]*}
ctext::addHighlightClassForSpecialChars $txt qoute #b84a0c {"'`}
}
proc GO {txt} {
ctext::addHighlightClassForRegexp $txt flags orange {-+[a-zA-Z\-_]+}
ctext::addHighlightClass $txt stackControl #19a2a6 {if else while case switch func import return interface map}
ctext::addHighlightClass $txt types #7187d5 {string int int16 int32 int64 float bool byte}
ctext::addHighlightClassWithOnlyCharStart $txt vars #4471ca "\&"
# ctext::addHighlightClassForRegexp $txt vars_extended #4471ca {\$\{[a-zA-Z0-9\_\-:\./\$\{\}]+\}}
ctext::addHighlightClass $txt variable_funcs gold {var type struct}
ctext::addHighlightClassForSpecialChars $txt brackets green {[]{}()}
ctext::addHighlightClassForRegexp $txt paths lightblue {\.[a-zA-Z0-9\_\-]+}
ctext::addHighlightClassForRegexp $txt comments #666666 {(#|//)[^\n\r]*}
ctext::addHighlightClassForSpecialChars $txt qoute #b84a0c {"'`}
}
}