Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.80.0 #930

Merged
merged 4 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pkg/heartbeat/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,8 @@ const (
LanguageHyPhy
// LanguageIcon represents the Icon programming language.
LanguageIcon
// LanguageIDA represents the IDA programming language.
LanguageIDA
// LanguageIDL represents the IDL programming language.
LanguageIDL
// LanguageIdris represents the Idris programming language.
Expand Down Expand Up @@ -891,6 +893,8 @@ const (
LanguageModula2
// LanguageMoinWiki represents the MoinWiki programming language.
LanguageMoinWiki
// LanguageMojo represents the Mojo programming language.
LanguageMojo
// LanguageMonkey represents the Monkey programming language.
LanguageMonkey
// LanguageMonkeyC represents the MonkeyC programming language.
Expand Down Expand Up @@ -1886,6 +1890,7 @@ const (
languageHybrisStr = "Hybris"
languageHyPhyStr = "HyPhy"
languageIconStr = "Icon"
languageIDAStr = "IDA"
languageIDLStr = "IDL"
languageIdrisStr = "Idris"
languageIgnoreListStr = "Ignore List"
Expand Down Expand Up @@ -2004,6 +2009,7 @@ const (
languageModelicaStr = "Modelica"
languageModula2Str = "Modula-2"
languageMoinWikiStr = "MoinMoin/Trac Wiki markup"
languageMojoStr = "Mojo"
languageMonkeyStr = "Monkey"
languageMonkeyCStr = "MonkeyC"
languageMonteStr = "Monte"
Expand Down Expand Up @@ -3044,6 +3050,8 @@ func ParseLanguage(s string) (Language, bool) {
return LanguageHyPhy, true
case normalizeString(languageIconStr):
return LanguageIcon, true
case normalizeString(languageIDAStr):
return LanguageIDA, true
case normalizeString(languageIDLStr):
return LanguageIDL, true
case normalizeString(languageIdrisStr):
Expand Down Expand Up @@ -3280,6 +3288,8 @@ func ParseLanguage(s string) (Language, bool) {
return LanguageModula2, true
case normalizeString(languageMoinWikiStr):
return LanguageMoinWiki, true
case normalizeString(languageMojoStr):
return LanguageMojo, true
case normalizeString(languageMonkeyStr):
return LanguageMonkey, true
case normalizeString(languageMonkeyCStr):
Expand Down Expand Up @@ -4720,6 +4730,8 @@ func (l Language) String() string {
return languageHyPhyStr
case LanguageIcon:
return languageIconStr
case LanguageIDA:
return languageIDAStr
case LanguageIDL:
return languageIDLStr
case LanguageIdris:
Expand Down Expand Up @@ -4956,6 +4968,8 @@ func (l Language) String() string {
return languageModula2Str
case LanguageMoinWiki:
return languageMoinWikiStr
case LanguageMojo:
return languageMojoStr
case LanguageMonkey:
return languageMonkeyStr
case LanguageMonkeyC:
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 @@ -335,6 +335,7 @@ func languageTests() map[string]heartbeat.Language {
"Hybris": heartbeat.LanguageHybris,
"HyPhy": heartbeat.LanguageHyPhy,
"Icon": heartbeat.LanguageIcon,
"IDA": heartbeat.LanguageIDA,
"IDL": heartbeat.LanguageIDL,
"Idris": heartbeat.LanguageIdris,
"Ignore List": heartbeat.LanguageIgnoreList,
Expand Down Expand Up @@ -453,6 +454,7 @@ func languageTests() map[string]heartbeat.Language {
"Modelica": heartbeat.LanguageModelica,
"Modula-2": heartbeat.LanguageModula2,
"MoinMoin/Trac Wiki markup": heartbeat.LanguageMoinWiki,
"Mojo": heartbeat.LanguageMojo,
"Monkey": heartbeat.LanguageMonkey,
"MonkeyC": heartbeat.LanguageMonkeyC,
"Monte": heartbeat.LanguageMonte,
Expand Down
32 changes: 32 additions & 0 deletions pkg/lexer/ida.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package lexer

import (
"github.com/wakatime/wakatime-cli/pkg/heartbeat"

"github.com/alecthomas/chroma/v2"
)

// IDA lexer.
type IDA struct{}

// Lexer returns the lexer.
func (l IDA) Lexer() chroma.Lexer {
return chroma.MustNewLexer(
&chroma.Config{
Name: l.Name(),
Aliases: []string{"IDA Pro", "IDA Free"},
Filenames: []string{"*.i64", "*.idb"},
MimeTypes: []string{"text/x-ida"},
},
func() chroma.Rules {
return chroma.Rules{
"root": {},
}
},
)
}

// Name returns the name of the lexer.
func (IDA) Name() string {
return heartbeat.LanguageIDA.StringChroma()
}
2 changes: 2 additions & 0 deletions pkg/lexer/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func RegisterAll() error {
INI{},
IRCLogs{},
Icon{},
IDA{},
Inform6{},
Inform6Template{},
Inform7{},
Expand Down Expand Up @@ -169,6 +170,7 @@ func RegisterAll() error {
MiniScript{},
Modelica{},
Modula2{},
Mojo{},
Monkey{},
Monte{},
MoonScript{},
Expand Down
32 changes: 32 additions & 0 deletions pkg/lexer/mojo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package lexer

import (
"github.com/wakatime/wakatime-cli/pkg/heartbeat"

"github.com/alecthomas/chroma/v2"
)

// Mojo lexer.
type Mojo struct{}

// Lexer returns the lexer.
func (l Mojo) Lexer() chroma.Lexer {
return chroma.MustNewLexer(
&chroma.Config{
Name: l.Name(),
Aliases: []string{"mojo"},
Filenames: []string{"*.🔥", "*.mojo"},
MimeTypes: []string{"text/x-mojo"},
},
func() chroma.Rules {
return chroma.Rules{
"root": {},
}
},
)
}

// Name returns the name of the lexer.
func (Mojo) Name() string {
return heartbeat.LanguageMojo.StringChroma()
}
Loading