Skip to content

Commit

Permalink
Bump Chroma to v2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gandarez committed Sep 16, 2024
1 parent 9196805 commit 7acb0a9
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.5
require (
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358
github.com/alecthomas/assert v1.0.0
github.com/alecthomas/chroma/v2 v2.9.1
github.com/alecthomas/chroma/v2 v2.10.0
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
github.com/dlclark/regexp2 v1.10.0
github.com/gandarez/go-olson-timezone v0.1.0
Expand All @@ -30,7 +30,7 @@ require (

require (
github.com/alecthomas/colour v0.1.0 // indirect
github.com/alecthomas/repr v0.2.0 // indirect
github.com/alecthomas/repr v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand All @@ -55,6 +55,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/alecthomas/chroma/v2 => github.com/gandarez/chroma/v2 v2.9.1-wakatime.1
// replace github.com/alecthomas/chroma/v2 => github.com/gandarez/chroma/v2 v2.9.1-wakatime.1
// replace github.com/alecthomas/chroma/v2 => /Users/gandarez/development/git/gandarez/chroma

replace github.com/matishsiao/goInfo => github.com/wakatime/goInfo v0.1.0-wakatime.9
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ github.com/alecthomas/assert v1.0.0 h1:3XmGh/PSuLzDbK3W2gUbRXwgW5lqPkuqvRgeQ30FI
github.com/alecthomas/assert v1.0.0/go.mod h1:va/d2JC+M7F6s+80kl/R3G7FUiW6JzUO+hPhLyJ36ZY=
github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink=
github.com/alecthomas/assert/v2 v2.2.1/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
github.com/alecthomas/chroma/v2 v2.10.0 h1:T2iQOCCt4pRmRMfL55gTodMtc7cU0y7lc1Jb8/mK/64=
github.com/alecthomas/chroma/v2 v2.10.0/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw=
github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk=
github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0=
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8=
github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
Expand Down Expand Up @@ -75,8 +77,6 @@ github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0X
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gandarez/chroma/v2 v2.9.1-wakatime.1 h1:czvEuO+JRT4y2HTTh0REP0p0ebfleH6eY70UI0WF4OQ=
github.com/gandarez/chroma/v2 v2.9.1-wakatime.1/go.mod h1:4TQu7gdfuPjSh76j78ietmqh9LiurGF0EpseFXdKMBw=
github.com/gandarez/go-olson-timezone v0.1.0 h1:cDRlHKQE0uC3mJNZyKoQIpAuvQtV8KXwIVj8bDEEyuo=
github.com/gandarez/go-olson-timezone v0.1.0/go.mod h1:+yV/cYNjgs2JqdGShznAD4R13r8lKMGR2XlWAJqa5Yo=
github.com/gandarez/go-realpath v1.0.0 h1:fhQBRDshH/MZNmDLWM9vbBameK2fxyLr+ctqkRwbHEU=
Expand Down
6 changes: 3 additions & 3 deletions pkg/deps/java.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ func (p *ParserJava) processToken(token chroma.Token) {
p.processNameAttribute(token.Value)
case chroma.NameNamespace:
p.processNameNamespace(token.Value)
case chroma.Operator:
p.processOperator(token.Value)
case chroma.Punctuation:
p.processPunctuation(token.Value)
}
}

Expand Down Expand Up @@ -170,7 +170,7 @@ func (p *ParserJava) processNameNamespace(value string) {
}
}

func (p *ParserJava) processOperator(value string) {
func (p *ParserJava) processPunctuation(value string) {
if value == ";" {
p.State = StateJavaImportFinished
p.processKeywordNamespace(p.Buffer)
Expand Down
14 changes: 14 additions & 0 deletions pkg/heartbeat/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ const (
LanguageCSV
// LanguageCUDA represents the CUDA programming language.
LanguageCUDA
// LanguageCUE represents the CUE programming language.
LanguageCUE
// LanguagecURLConfig represents the cURLConfig programming language.
LanguagecURLConfig
// LanguageCVS represents the CVS programming language.
Expand Down Expand Up @@ -1061,6 +1063,8 @@ const (
LanguagePromQL
// LanguageProtocolBuffer represents the ProtocolBuffer programming language.
LanguageProtocolBuffer
// LanguagePRQL represents the PRQL programming language.
LanguagePRQL
// LanguagePSL represents the Property Specification Language programming language.
LanguagePSL
// LanguagePsyShPHP represents the PHPPsySH programming language.
Expand Down Expand Up @@ -1728,6 +1732,7 @@ const (
languageCSSStr = "CSS"
languageCSVStr = "CSV"
languageCUDAStr = "Cuda"
languageCUEStr = "CUE"
languagecURLConfigStr = "cURL Config"
languageCVSStr = "CVS"
languageCWebStr = "CWeb"
Expand Down Expand Up @@ -2098,6 +2103,7 @@ const (
languagePrologStr = "Prolog"
languagePromQLStr = "PromQL"
languageProtocolBufferStr = "Protocol Buffer"
languagePRQLStr = "PRQL"
languagePSLStr = "Property Specification Language"
languagePsyShPHPStr = "PsySH console session for PHP"
languagePugStr = "Pug"
Expand Down Expand Up @@ -2723,6 +2729,8 @@ func ParseLanguage(s string) (Language, bool) {
return LanguageCSV, true
case normalizeString(languageCUDAStr):
return LanguageCUDA, true
case normalizeString(languageCUEStr):
return LanguageCUE, true
case normalizeString(languagecURLConfigStr):
return LanguagecURLConfig, true
case normalizeString(languageCVSStr):
Expand Down Expand Up @@ -3463,6 +3471,8 @@ func ParseLanguage(s string) (Language, bool) {
return LanguagePromQL, true
case normalizeString(languageProtocolBufferStr):
return LanguageProtocolBuffer, true
case normalizeString(languagePRQLStr):
return LanguagePRQL, true
case normalizeString(languagePSLStr):
return LanguagePSL, true
case normalizeString(languagePsyShPHPStr):
Expand Down Expand Up @@ -4411,6 +4421,8 @@ func (l Language) String() string {
return languageCSVStr
case LanguageCUDA:
return languageCUDAStr
case LanguageCUE:
return languageCUEStr
case LanguagecURLConfig:
return languagecURLConfigStr
case LanguageCVS:
Expand Down Expand Up @@ -5149,6 +5161,8 @@ func (l Language) String() string {
return languagePromQLStr
case LanguageProtocolBuffer:
return languageProtocolBufferStr
case LanguagePRQL:
return languagePRQLStr
case LanguagePsyShPHP:
return languagePsyShPHPStr
case LanguagePug:
Expand Down
2 changes: 2 additions & 0 deletions pkg/heartbeat/language_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func languageTests() map[string]heartbeat.Language {
"CSS": heartbeat.LanguageCSS,
"CSV": heartbeat.LanguageCSV,
"Cuda": heartbeat.LanguageCUDA,
"CUE": heartbeat.LanguageCUE,
"cURL Config": heartbeat.LanguagecURLConfig,
"CVS": heartbeat.LanguageCVS,
"CWeb": heartbeat.LanguageCWeb,
Expand Down Expand Up @@ -537,6 +538,7 @@ func languageTests() map[string]heartbeat.Language {
"PromQL": heartbeat.LanguagePromQL,
"Property Specification Language": heartbeat.LanguagePSL,
"Protocol Buffer": heartbeat.LanguageProtocolBuffer,
"PRQL": heartbeat.LanguagePRQL,
"PsySH console session for PHP": heartbeat.LanguagePsyShPHP,
"Pug": heartbeat.LanguagePug,
"Puppet": heartbeat.LanguagePuppet,
Expand Down

0 comments on commit 7acb0a9

Please sign in to comment.