diff options
| author | OpportunityLiu <[email protected]> | 2019-06-19 14:48:00 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-19 14:48:00 +0800 |
| commit | b975e1c77606cebc7e08cfc40d8d7517ad080c2d (patch) | |
| tree | d533dd8437a5a6f3a1e4e18f19db7a81b887a9bb /xmake | |
| parent | 522a4454a460e46ee98a41c9c4f9df1f92ae0ffe (diff) | |
use theme
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/core/base/dump.lua | 12 | ||||
| -rw-r--r-- | xmake/themes/dark/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/themes/default/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/themes/emoji/xmake.lua | 6 | ||||
| -rw-r--r-- | xmake/themes/plain/xmake.lua | 6 |
5 files changed, 30 insertions, 6 deletions
diff --git a/xmake/core/base/dump.lua b/xmake/core/base/dump.lua index 43a6f95f5..ee1bef9d8 100644 --- a/xmake/core/base/dump.lua +++ b/xmake/core/base/dump.lua @@ -29,22 +29,22 @@ local table = require("base/table") function dump._string(str, as_key) local quote = (not as_key) or (not str:match("^[a-zA-Z_][a-zA-Z0-9_]*$")) if quote then - io.write(colors.translate("${cyan}\"")) + io.write(colors.translate("${color.dump.string}\"")) end - io.write(colors.translate("${reset}${cyan bright}", { patch_reset = false })) + io.write(colors.translate("${reset}${color.dump.string bright}", { patch_reset = false })) io.write(str) io.write(colors.translate("${reset}", { patch_reset = false })) if quote then - io.write(colors.translate("${cyan}\"")) + io.write(colors.translate("${color.dump.string}\"")) end end function dump._keyword(keyword) - io.write(colors.translate("${blue}" .. tostring(keyword))) + io.write(colors.translate("${color.dump.keyword}" .. tostring(keyword))) end function dump._number(num) - io.write(colors.translate("${green}" .. num)) + io.write(colors.translate("${color.dump.number}" .. num)) end function dump._function(func, as_key) @@ -56,7 +56,7 @@ function dump._function(func, as_key) if funcinfo.linedefined >= 0 then srcinfo = srcinfo .. ":" .. funcinfo.linedefined end - io.write(colors.translate("${red}function ${bright}" .. (funcinfo.name or "") .. "${reset}${dim}" .. srcinfo)) + io.write(colors.translate("${color.dump.function}function ${bright}" .. (funcinfo.name or "") .. "${reset}${dim}" .. srcinfo)) end function dump._default(value) diff --git a/xmake/themes/dark/xmake.lua b/xmake/themes/dark/xmake.lua index dcf8119d3..f8d6a6b18 100644 --- a/xmake/themes/dark/xmake.lua +++ b/xmake/themes/dark/xmake.lua @@ -51,3 +51,9 @@ theme("dark") -- the building target file set_color("build.target", "magenta") + -- color dump + set_color("dump.string", "cyan") + set_color("dump.keyword", "blue") + set_color("dump.number", "green") + set_color("dump.function", "red") + diff --git a/xmake/themes/default/xmake.lua b/xmake/themes/default/xmake.lua index 86037da4b..0762185e4 100644 --- a/xmake/themes/default/xmake.lua +++ b/xmake/themes/default/xmake.lua @@ -51,3 +51,9 @@ theme("default") -- the building target file set_color("build.target", "magenta") + -- color dump + set_color("dump.string", "cyan") + set_color("dump.keyword", "blue") + set_color("dump.number", "green") + set_color("dump.function", "red") + diff --git a/xmake/themes/emoji/xmake.lua b/xmake/themes/emoji/xmake.lua index afb137928..6bfbc39a4 100644 --- a/xmake/themes/emoji/xmake.lua +++ b/xmake/themes/emoji/xmake.lua @@ -51,3 +51,9 @@ theme("emoji") -- the building target file set_color("build.target", "magenta") + -- color dump + set_color("dump.string", "cyan") + set_color("dump.keyword", "blue") + set_color("dump.number", "green") + set_color("dump.function", "red") + diff --git a/xmake/themes/plain/xmake.lua b/xmake/themes/plain/xmake.lua index 3417eb317..1b782e9e9 100644 --- a/xmake/themes/plain/xmake.lua +++ b/xmake/themes/plain/xmake.lua @@ -51,3 +51,9 @@ theme("plain") -- the building target file set_color("build.target", "") + -- color dump + set_color("dump.string", "") + set_color("dump.keyword", "") + set_color("dump.number", "") + set_color("dump.function", "") + |
