From 6bd44c946c3321394f6792c9f79c05a2089a746c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 10 Nov 2022 18:12:24 +0100 Subject: [PATCH] feat: added extra styles for delta. Use in combination with bat styles --- extras/delta/tokyonight_day.gitconfig | 9 +++++++++ extras/delta/tokyonight_moon.gitconfig | 9 +++++++++ extras/delta/tokyonight_night.gitconfig | 9 +++++++++ extras/delta/tokyonight_storm.gitconfig | 9 +++++++++ lua/tokyonight/extra/delta.lua | 24 ++++++++++++++++++++++++ lua/tokyonight/extra/init.lua | 1 + 6 files changed, 61 insertions(+) create mode 100644 extras/delta/tokyonight_day.gitconfig create mode 100644 extras/delta/tokyonight_moon.gitconfig create mode 100644 extras/delta/tokyonight_night.gitconfig create mode 100644 extras/delta/tokyonight_storm.gitconfig create mode 100644 lua/tokyonight/extra/delta.lua diff --git a/extras/delta/tokyonight_day.gitconfig b/extras/delta/tokyonight_day.gitconfig new file mode 100644 index 0000000..85dfb64 --- /dev/null +++ b/extras/delta/tokyonight_day.gitconfig @@ -0,0 +1,9 @@ +[delta] +minus-style = syntax "#37222c" +minus-non-emph-style = syntax "#37222c" +minus-emph-style = "#15161e" "#db4b4b" +minus-empty-line-marker-style = syntax "#37222c" +plus-style = syntax "#20303b" +plus-non-emph-style = syntax "#20303b" +plus-emph-style = "#15161e" "#41a6b5" +plus-empty-line-marker-style = syntax "#20303b" diff --git a/extras/delta/tokyonight_moon.gitconfig b/extras/delta/tokyonight_moon.gitconfig new file mode 100644 index 0000000..b895ab7 --- /dev/null +++ b/extras/delta/tokyonight_moon.gitconfig @@ -0,0 +1,9 @@ +[delta] +minus-style = syntax "#3a273a" +minus-non-emph-style = syntax "#3a273a" +minus-emph-style = "#1b1d2b" "#c53b53" +minus-empty-line-marker-style = syntax "#3a273a" +plus-style = syntax "#273849" +plus-non-emph-style = syntax "#273849" +plus-emph-style = "#1b1d2b" "#41a6b5" +plus-empty-line-marker-style = syntax "#273849" diff --git a/extras/delta/tokyonight_night.gitconfig b/extras/delta/tokyonight_night.gitconfig new file mode 100644 index 0000000..85dfb64 --- /dev/null +++ b/extras/delta/tokyonight_night.gitconfig @@ -0,0 +1,9 @@ +[delta] +minus-style = syntax "#37222c" +minus-non-emph-style = syntax "#37222c" +minus-emph-style = "#15161e" "#db4b4b" +minus-empty-line-marker-style = syntax "#37222c" +plus-style = syntax "#20303b" +plus-non-emph-style = syntax "#20303b" +plus-emph-style = "#15161e" "#41a6b5" +plus-empty-line-marker-style = syntax "#20303b" diff --git a/extras/delta/tokyonight_storm.gitconfig b/extras/delta/tokyonight_storm.gitconfig new file mode 100644 index 0000000..917434b --- /dev/null +++ b/extras/delta/tokyonight_storm.gitconfig @@ -0,0 +1,9 @@ +[delta] +minus-style = syntax "#3f2d3d" +minus-non-emph-style = syntax "#3f2d3d" +minus-emph-style = "#1d202f" "#db4b4b" +minus-empty-line-marker-style = syntax "#3f2d3d" +plus-style = syntax "#283b4d" +plus-non-emph-style = syntax "#283b4d" +plus-emph-style = "#1d202f" "#41a6b5" +plus-empty-line-marker-style = syntax "#283b4d" diff --git a/lua/tokyonight/extra/delta.lua b/lua/tokyonight/extra/delta.lua new file mode 100644 index 0000000..1def63c --- /dev/null +++ b/lua/tokyonight/extra/delta.lua @@ -0,0 +1,24 @@ +local util = require("tokyonight.util") + +local M = {} + +--- @param colors ColorScheme +function M.generate(colors) + local delta = util.template( + [[ +[delta] +minus-style = syntax "${diff.delete}" +minus-non-emph-style = syntax "${diff.delete}" +minus-emph-style = "${black}" "${red1}" +minus-empty-line-marker-style = syntax "${diff.delete}" +plus-style = syntax "${diff.add}" +plus-non-emph-style = syntax "${diff.add}" +plus-emph-style = "${black}" "${green2}" +plus-empty-line-marker-style = syntax "${diff.add}" +]], + colors + ) + return delta +end + +return M diff --git a/lua/tokyonight/extra/init.lua b/lua/tokyonight/extra/init.lua index 753c61b..509330a 100644 --- a/lua/tokyonight/extra/init.lua +++ b/lua/tokyonight/extra/init.lua @@ -26,6 +26,7 @@ function M.setup() iterm = "itermcolors", lua = "lua", sublime = "tmTheme", + delta = "gitconfig", } -- map of style to style name local styles = {