Skip to content

Commit

Permalink
Merge pull request #1608 from rsteube/chroma-style
Browse files Browse the repository at this point in the history
chroma: style completion
  • Loading branch information
rsteube authored Mar 27, 2023
2 parents 93ea6c5 + c498b24 commit 4815a84
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 3 deletions.
6 changes: 5 additions & 1 deletion completers/chroma_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ func init() {
"formatter": chroma.ActionFormatters(),
"lexer": chroma.ActionLexers(),
"profile": carapace.ActionFiles(),
"xml": carapace.ActionDirectories(),
"style": carapace.Batch(
chroma.ActionStyles(),
carapace.ActionFiles(),
).ToA(),
"xml": carapace.ActionDirectories(),
})

carapace.Gen(rootCmd).PositionalAnyCompletion(
Expand Down
2 changes: 1 addition & 1 deletion pkg/actions/tools/chroma/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ func ActionFormatters() carapace.Action {
"terminal256",
"terminal8",
"tokens",
)
).Tag("formatters")
}
2 changes: 1 addition & 1 deletion pkg/actions/tools/chroma/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,5 +243,5 @@ func ActionLexers() carapace.Action {
"Z80 Assembly",
"Zed",
"Zig",
)
).Tag("lexers")
}
72 changes: 72 additions & 0 deletions pkg/actions/tools/chroma/style.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package chroma

import "github.com/rsteube/carapace"

// ActionStyles completes styles
//
// abap
// algol
func ActionStyles() carapace.Action {
return carapace.ActionValues(
"abap",
"algol",
"algol_nu",
"arduino",
"autumn",
"average",
"base16-snazzy",
"borland",
"bw",
"catppuccin-frappe",
"catppuccin-latte",
"catppuccin-macchiato",
"catppuccin-mocha",
"colorful",
"doom-one",
"doom-one2",
"dracula",
"emacs",
"friendly",
"fruity",
"github",
"github-dark",
"gruvbox",
"gruvbox-light",
"hr_high_contrast",
"hrdark",
"igor",
"lovelace",
"manni",
"modus-operandi",
"modus-vivendi",
"monokai",
"monokailight",
"murphy",
"native",
"nord",
"onedark",
"onesenterprise",
"paraiso-dark",
"paraiso-light",
"pastie",
"perldoc",
"pygments",
"rainbow_dash",
"rose-pine",
"rose-pine-dawn",
"rose-pine-moon",
"rrt",
"solarized-dark",
"solarized-dark256",
"solarized-light",
"swapoff",
"tango",
"trac",
"vim",
"vs",
"vulcan",
"witchhazel",
"xcode",
"xcode-dark",
).Tag("styles")
}

0 comments on commit 4815a84

Please sign in to comment.