diff --git a/after/plugin/theme.lua b/after/plugin/theme.lua index 2258321..1f08640 100644 --- a/after/plugin/theme.lua +++ b/after/plugin/theme.lua @@ -1,13 +1,14 @@ --TODO: migrate to noirbuddy +-- used to override nvchad highlights local c = require("base46.colors") local colors = require("base46").get_theme_tb "base_30" +local colors16 = require("base46").get_theme_tb "base_16" -- local theme = require("base46").get_theme_tb "base_16" local ts_context_hl = c.change_hex_saturation(colors["yellow"], -20) local ts_context_hl = c.change_hex_lightness(ts_context_hl, -55) - local highlights = { -- TreesitterContext = { -- bg = ts_context_hl, @@ -29,8 +30,202 @@ local highlights = { } +local statusline = { + + StatusLine = { + bg = colors.statusline_bg, + }, + + St_gitIcons = { + fg = colors.light_grey, + bg = colors.statusline_bg, + bold = true, + }, + + -- LSP + + St_lspError = { + fg = colors.red, + bg = colors.statusline_bg, + }, + + St_lspWarning = { + fg = colors.yellow, + bg = colors.statusline_bg, + }, + + St_LspHints = { + fg = colors.purple, + bg = colors.statusline_bg, + }, + + St_LspInfo = { + fg = colors.green, + bg = colors.statusline_bg, + }, + + St_LspStatus = { + fg = colors.nord_blue, + bg = colors.statusline_bg, + }, + + St_LspProgress = { + fg = colors.green, + bg = colors.statusline_bg, + }, + + St_LspStatus_Icon = { + fg = colors.black, + bg = colors.nord_blue, + }, + + -- MODES + + St_NormalMode = { + fg = colors.blue, + bg = colors.black, + }, + + St_InsertMode = { + fg = colors16.base0B, + bg = colors.black, + + }, + + St_TerminalMode = { + fg = colors.green, + bg = colors.black, + }, + + St_NTerminalMode = { + fg = colors.yellow, + bg = colors.black, + }, + + St_VisualMode = { + fg = colors.cyan, + bg = colors.black, + }, + + St_ReplaceMode = { + fg = colors.orange, + bg = colors.black, + }, + + St_ConfirmMode = { + fg = colors.teal, + bg = colors.black, + }, + + St_CommandMode = { + fg = colors.green, + bg = colors.black, + }, + + St_SelectMode = { + fg = colors.nord_blue, + bg = colors.black, + }, + + -- Separators for mode + St_NormalModeSep = { + bg = colors.nord_blue, + fg = colors.black, + }, + + St_InsertModeSep = { + bg = colors16.base0B, + fg = colors.black, + }, + + St_TerminalModeSep = { + bg = colors.green, + fg = colors.black, + }, + + St_NTerminalModeSep = { + bg = colors.yellow, + fg = colors.black, + }, + + St_VisualModeSep = { + bg = colors.cyan, + fg = colors.black, + }, + + St_ReplaceModeSep = { + bg = colors.orange, + fg = colors.black, + }, + + St_ConfirmModeSep = { + bg = colors.teal, + fg = colors.black, + }, + + St_CommandModeSep = { + bg = colors.green, + fg = colors.black, + }, + + St_SelectModeSep = { + bg = colors.nord_blue, + fg = colors.black, + }, + + St_EmptySpace = { + fg = colors.grey, + bg = colors.lightbg, + }, + + St_EmptySpace2 = { + fg = colors.grey, + bg = colors.statusline_bg, + }, + + St_file_info = { + bg = colors.black, + fg = colors.grey_fg2, + }, + + St_file_sep = { + bg = colors.statusline_bg, + fg = colors.black, + }, + + St_cwd_icon = { + fg = colors.one_bg, + bg = colors.red, + }, + + St_cwd_text = { + fg = colors.grey_fg2, + bg = colors.black, + }, + + St_cwd_sep = { + fg = colors.red, + bg = colors.statusline_bg, + }, + + St_pos_sep = { + fg = colors.base04, + bg = colors.lightbg, + }, + + St_pos_icon = { + fg = colors.black, + bg = colors.green, + }, + + St_pos_text = { + fg = colors16.base04, + bg = colors.lightbg, + }, +} + function set_hl() - for hl, col in pairs(highlights) do + for hl, col in pairs(vim.tbl_deep_extend("force", highlights, statusline)) do vim.api.nvim_set_hl(0, hl, col) end end diff --git a/lua/core/options.lua b/lua/core/options.lua index 0b22f31..9ed7db3 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -12,7 +12,7 @@ g.theme_switcher_loaded = false -- if vim.fn.executable("sh") then opt.shell = vim.fn.exepath("sh") end if vim.fn.executable("fish") then - opt.shell = 'fish -C vim_prompt' + opt.shell = 'fish -C vjm_prompt' end -- use filetype.lua instead of filetype.vim. it's enabled by default in neovim 0.8 (nightly) @@ -24,11 +24,7 @@ end opt.laststatus = 3 -- global statusline -- for statusline format see lua/custom/plugins/nvchadui.lua -if vim.env.STREAMING ~= nil then - opt.cmdheight = 0 -else - opt.cmdheight = 1 -end +opt.cmdheight = 1 opt.showmode = false opt.title = true diff --git a/lua/custom/highlights.lua b/lua/custom/highlights.lua index 7220d03..a8c5055 100644 --- a/lua/custom/highlights.lua +++ b/lua/custom/highlights.lua @@ -1,5 +1,9 @@ +-- nvchad custom highlights +-- most highlights are set in the noirbuddy custom highlights local M = {} + +-- being migrated to noirbuddy, only statusline is defined here M.override = { -- IndentBlanklineContextChar = { -- fg = "baby_pink", @@ -138,5 +142,4 @@ M.add = { } - return M diff --git a/lua/custom/plugins/configs/noirbuddy.lua b/lua/custom/plugins/configs/noirbuddy.lua index d00a50c..78dbe63 100644 --- a/lua/custom/plugins/configs/noirbuddy.lua +++ b/lua/custom/plugins/configs/noirbuddy.lua @@ -15,9 +15,9 @@ M.palette = { noir_0 = "#e9e9f4", noir_1 = "#f1f2f8", noir_2 = "#e4e4f1", - loir_3 = "#d4d4dd", - loir_4 = "#cdcdd7", - loir_5 = "#b9b9c7", + noir_3 = "#d4d4dd", + noir_4 = "#cdcdd7", + noir_5 = "#b9b9c7", noir_6 = "#a8a8b9", noir_7 = "#757b9a", noir_8 = "#353848", diff --git a/lua/custom/plugins/nvchadui.lua b/lua/custom/plugins/nvchadui.lua index 2248de2..4a7309d 100644 --- a/lua/custom/plugins/nvchadui.lua +++ b/lua/custom/plugins/nvchadui.lua @@ -12,32 +12,32 @@ local sep_r = separators["right"] local myicons = require("custom.chadrc").ui.myicons local modes = { - ["n"] = { "NORMAL", "St_NormalMode" }, + ["n"] = { "NORMAL", "St_NormalMode" }, ["niI"] = { "NORMAL i", "St_NormalMode" }, ["niR"] = { "NORMAL r", "St_NormalMode" }, ["niV"] = { "NORMAL v", "St_NormalMode" }, - ["no"] = { "N-PENDING", "St_NormalMode" }, - ["i"] = { "INSERT", "St_InsertMode" }, - ["ic"] = { "INSERT (completion)", "St_InsertMode" }, - ["ix"] = { "INSERT completion", "St_InsertMode" }, - ["t"] = { "TERMINAL", "St_TerminalMode" }, - ["nt"] = { "NTERMINAL", "St_NTerminalMode" }, - ["v"] = { "VISUAL", "St_VisualMode" }, - ["V"] = { "V-LINE", "St_VisualMode" }, - ["Vs"] = { "V-LINE (Ctrl O)", "St_VisualMode" }, - [""] = { "V-BLOCK", "St_VisualMode" }, - ["R"] = { "REPLACE", "St_ReplaceMode" }, - ["Rv"] = { "V-REPLACE", "St_ReplaceMode" }, - ["s"] = { "SELECT", "St_SelectMode" }, - ["S"] = { "S-LINE", "St_SelectMode" }, - [""] = { "S-BLOCK", "St_SelectMode" }, - ["c"] = { "COMMAND", "St_CommandMode" }, - ["cv"] = { "COMMAND", "St_CommandMode" }, - ["ce"] = { "COMMAND", "St_CommandMode" }, - ["r"] = { "PROMPT", "St_ConfirmMode" }, - ["rm"] = { "MORE", "St_ConfirmMode" }, - ["r?"] = { "CONFIRM", "St_ConfirmMode" }, - ["!"] = { "SHELL", "St_TerminalMode" }, + ["no"] = { "N-PENDING", "St_NormalMode" }, + ["i"] = { "INSERT", "St_InsertMode" }, + ["ic"] = { "INSERT (completion)", "St_InsertMode" }, + ["ix"] = { "INSERT completion", "St_InsertMode" }, + ["t"] = { "TERMINAL", "St_TerminalMode" }, + ["nt"] = { "NTERMINAL", "St_NTerminalMode" }, + ["v"] = { "VISUAL", "St_VisualMode" }, + ["V"] = { "V-LINE", "St_VisualMode" }, + ["Vs"] = { "V-LINE (Ctrl O)", "St_VisualMode" }, + [""] = { "V-BLOCK", "St_VisualMode" }, + ["R"] = { "REPLACE", "St_ReplaceMode" }, + ["Rv"] = { "V-REPLACE", "St_ReplaceMode" }, + ["s"] = { "SELECT", "St_SelectMode" }, + ["S"] = { "S-LINE", "St_SelectMode" }, + [""] = { "S-BLOCK", "St_SelectMode" }, + ["c"] = { "COMMAND", "St_CommandMode" }, + ["cv"] = { "COMMAND", "St_CommandMode" }, + ["ce"] = { "COMMAND", "St_CommandMode" }, + ["r"] = { "PROMPT", "St_ConfirmMode" }, + ["rm"] = { "MORE", "St_ConfirmMode" }, + ["r?"] = { "CONFIRM", "St_ConfirmMode" }, + ["!"] = { "SHELL", "St_TerminalMode" }, } local function is_dapmode() diff --git a/lua/plugins/configs/nvterm.lua b/lua/plugins/configs/nvterm.lua index 88d7dca..7bd083b 100644 --- a/lua/plugins/configs/nvterm.lua +++ b/lua/plugins/configs/nvterm.lua @@ -16,7 +16,7 @@ local options = { col = 0.2, width = 0.6, height = 0.6, - border = "single", + border = "shadow", }, horizontal = { location = "rightbelow", split_ratio = 0.4 }, vertical = { location = "rightbelow", split_ratio = 0.5 }, diff --git a/lua/theme/highlights/init.lua b/lua/theme/highlights/init.lua index 2111dd5..8327417 100644 --- a/lua/theme/highlights/init.lua +++ b/lua/theme/highlights/init.lua @@ -5,21 +5,15 @@ local blob42 = require("custom.themes.blob42") local import_theme_colors = function() for i, color in pairs(blob42.base_16) do - Color.new(i, color) + Color.new(i, color, {}) end for i, color in pairs(blob42.base_30) do - Color.new(i, color) + Color.new(i, color, {}) end end import_theme_colors() --- Color.new("green", blob42.base_30.green) --- Color.new("yellow", blob42.base_30.yellow) --- Color.new("orange", blob42.base_30.orange) --- Color.new("sun", blob42.base_30.sun) --- Color.new("base03", blob42.base_16.base03) --- Color.new("base0E", blob42.base_16.base0E) Color.new("dap_stop", "#ff4848", {}) Color.new("dap_virtual_text", "#f99540", {}) @@ -91,6 +85,8 @@ M.setup = function() Group.new("@variable", colors.noir_0) + -- Command line area + Group.new("msgarea", colors.noir_3) -- defined in chadrc custom