From 5587924bfc1812d3edc7e2d725b14e59ef00aef8 Mon Sep 17 00:00:00 2001 From: svkalinin Date: Fri, 22 Jul 2022 16:01:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D1=81=D1=82=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20GO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG | 3 +++ lib/highlight.tcl | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 7232244..a120f43 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/lib/highlight.tcl b/lib/highlight.tcl index 9217937..d037027 100644 --- a/lib/highlight.tcl +++ b/lib/highlight.tcl @@ -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 {"'`} + } }