Pārlūkot izejas kodu

begin statusline color support

Chris 4 gadi atpakaļ
vecāks
revīzija
89a64381bf
1 mainītis faili ar 33 papildinājumiem un 37 dzēšanām
  1. 33 37
      lua/lv-galaxyline/init.lua

+ 33 - 37
lua/lv-galaxyline/init.lua

@@ -41,8 +41,8 @@ table.insert(gls.left, {
       vim.api.nvim_command("hi GalaxyViMode guifg=" .. mode_color[vim.fn.mode()])
       return "▊"
     end,
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { "NONE", colors.bg },
   },
 })
 -- print(vim.fn.getbufvar(0, 'ts'))
@@ -55,8 +55,8 @@ table.insert(gls.left, {
     end,
     condition = condition.check_git_workspace,
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineGit",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.orange, colors.bg },
   },
 })
 
@@ -65,8 +65,8 @@ table.insert(gls.left, {
     provider = "GitBranch",
     condition = condition.check_git_workspace,
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -75,7 +75,7 @@ table.insert(gls.left, {
     provider = "DiffAdd",
     condition = condition.hide_in_width,
     icon = "  ",
-    highlight = "StatusLineGitAdd",
+    highlight = { colors.green, colors.bg },
   },
 })
 
@@ -84,7 +84,7 @@ table.insert(gls.left, {
     provider = "DiffModified",
     condition = condition.hide_in_width,
     icon = " 柳",
-    highlight = "StatusLineGitChange",
+    highlight = { colors.blue, colors.bg },
   },
 })
 
@@ -93,7 +93,7 @@ table.insert(gls.left, {
     provider = "DiffRemove",
     condition = condition.hide_in_width,
     icon = "  ",
-    highlight = "StatusLineGitDelete",
+    highlight = { colors.red, colors.bg },
   },
 })
 
@@ -102,7 +102,7 @@ table.insert(gls.left, {
     provider = function()
       return " "
     end,
-    highlight = "StatusLineGitDelete",
+    highlight = { colors.grey, colors.bg },
   },
 })
 -- get output from shell command
@@ -146,8 +146,8 @@ end
 table.insert(gls.left, {
   VirtualEnv = {
     provider = PythonEnv,
-    highlight = "StatusLineTreeSitter",
     event = "BufEnter",
+    highlight = { colors.green, colors.bg },
   },
 })
 
@@ -155,15 +155,14 @@ table.insert(gls.right, {
   DiagnosticError = {
     provider = "DiagnosticError",
     icon = "  ",
-    highlight = "StatusLineLspDiagnosticsError",
+    highlight = { colors.red, colors.bg },
   },
 })
 table.insert(gls.right, {
   DiagnosticWarn = {
     provider = "DiagnosticWarn",
     icon = "  ",
-
-    highlight = "StatusLineLspDiagnosticsWarning",
+    highlight = { colors.orange, colors.bg },
   },
 })
 
@@ -171,8 +170,7 @@ table.insert(gls.right, {
   DiagnosticInfo = {
     provider = "DiagnosticInfo",
     icon = "  ",
-
-    highlight = "StatusLineLspDiagnosticsInformation",
+    highlight = { colors.yellow, colors.bg },
   },
 })
 
@@ -180,8 +178,7 @@ table.insert(gls.right, {
   DiagnosticHint = {
     provider = "DiagnosticHint",
     icon = "  ",
-
-    highlight = "StatusLineLspDiagnosticsHint",
+    highlight = { colors.blue, colors.bg },
   },
 })
 
@@ -194,8 +191,8 @@ table.insert(gls.right, {
       return ""
     end,
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineTreeSitter",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.green, colors.bg },
   },
 })
 
@@ -238,7 +235,7 @@ table.insert(gls.right, {
       return true
     end,
     icon = " ",
-    highlight = "StatusLineNC",
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -246,8 +243,8 @@ table.insert(gls.right, {
   LineInfo = {
     provider = "LineColumn",
     separator = "  ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -255,8 +252,8 @@ table.insert(gls.right, {
   PerCent = {
     provider = "LinePercent",
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -267,8 +264,8 @@ table.insert(gls.right, {
     end,
     condition = condition.hide_in_width,
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -277,8 +274,8 @@ table.insert(gls.right, {
     provider = "FileTypeName",
     condition = condition.hide_in_width,
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -287,8 +284,8 @@ table.insert(gls.right, {
     provider = "FileEncode",
     condition = condition.hide_in_width,
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -298,8 +295,8 @@ table.insert(gls.right, {
       return " "
     end,
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -307,8 +304,8 @@ table.insert(gls.short_line_left, {
   BufferType = {
     provider = "FileTypeName",
     separator = " ",
-    separator_highlight = "StatusLineSeparator",
-    highlight = "StatusLineNC",
+    separator_highlight = { "NONE", colors.bg },
+    highlight = { colors.grey, colors.bg },
   },
 })
 
@@ -316,8 +313,7 @@ table.insert(gls.short_line_left, {
   SFileName = {
     provider = "SFileName",
     condition = condition.buffer_not_empty,
-
-    highlight = "StatusLineNC",
+    highlight = { colors.grey, colors.bg },
   },
 })