瀏覽代碼

fix: Adding `Diff*` highlight groups in onedarker (#1594)

Fixes #1576
Subho Banerjee 3 年之前
父節點
當前提交
61b56a7bb1
共有 3 個文件被更改,包括 19 次插入0 次删除
  1. 12 0
      lua/onedarker/diff.lua
  2. 2 0
      lua/onedarker/init.lua
  3. 5 0
      lua/onedarker/palette.lua

+ 12 - 0
lua/onedarker/diff.lua

@@ -0,0 +1,12 @@
+local diff = {
+  DiffAdd = { fg = C.none, bg = C.diff_add },
+  DiffDelete = { fg = C.none, bg = C.diff_delete },
+  DiffChange = { fg = C.none, bg = C.diff_change, style = "bold" },
+  DiffText = { fg = C.none, bg = C.diff_text },
+  DiffAdded = { fg = C.green },
+  DiffRemoved = { fg = C.red },
+  DiffFile = { fg = C.cyan },
+  DiffIndexLine = { fg = C.gray },
+}
+
+return diff

+ 2 - 0
lua/onedarker/init.lua

@@ -15,6 +15,7 @@ local markdown = require "onedarker.markdown"
 local Whichkey = require "onedarker.Whichkey"
 local Git = require "onedarker.Git"
 local LSP = require "onedarker.LSP"
+local diff = require "onedarker.diff"
 
 local skeletons = {
   highlights,
@@ -23,6 +24,7 @@ local skeletons = {
   Whichkey,
   Git,
   LSP,
+  diff,
 }
 
 for _, skeleton in ipairs(skeletons) do

+ 5 - 0
lua/onedarker/palette.lua

@@ -1,4 +1,5 @@
 local colors = {
+  none = "NONE",
   fg = "#abb2bf",
   bg = "#1f2227",
   alt_bg = "#282c34",
@@ -34,6 +35,10 @@ local colors = {
   purple_test = "#ff007c",
   cyan_test = "#00dfff",
   ui_blue = "#264F78",
+  diff_add = "#303d27",
+  diff_delete = "#6e3b40",
+  diff_change = "#18344c",
+  diff_text = "#265478",
 }
 
 return colors