-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
local util = require "astrotheme.extras" | ||
|
||
local M = {} | ||
|
||
--- @param colors AstroThemePalette | ||
function M.generate(colors) | ||
return util.template( | ||
[[ | ||
/* Terminal colors (16 first used in escape sequence) */ | ||
static const char *colorname[] = { | ||
/* 8 normal colors */ | ||
"${term.black}", | ||
"${term.red}", | ||
"${term.green}", | ||
"${term.yellow}", | ||
"${term.blue}", | ||
"${term.purple}", | ||
"${term.cyan}", | ||
"${term.white}", | ||
/* 8 bright colors */ | ||
"${term.bright_black}", | ||
"${term.bright_red}", | ||
"${term.bright_green}", | ||
"${term.bright_yellow}", | ||
"${term.bright_blue}", | ||
"${term.bright_purple}", | ||
"${term.bright_cyan}", | ||
"${term.bright_white}", | ||
[256] = "${syntax.text}", | ||
[257] = "${ui.selection}", | ||
[258] = "${syntax.text}", /* default foreground colour */ | ||
[259] = "${ui.base}", /* default background colour */ | ||
}; | ||
/* | ||
* Default colors (colorname index) | ||
* foreground, background, cursor, reverse cursor | ||
*/ | ||
unsigned int defaultfg = 258; | ||
unsigned int defaultbg = 259; | ||
unsigned int defaultcs = 256; | ||
static unsigned int defaultrcs = 257; | ||
]], | ||
colors | ||
) | ||
end | ||
|
||
return M |