update theme, blankline, zenmode

master
blob42 9 months ago
parent 0005011361
commit 9bfddd6290

@ -12,3 +12,4 @@ au BufEnter * hi GuihuaListSelHl gui=underline guibg=bg
au BufEnter * hi TabLineFill NONE au BufEnter * hi TabLineFill NONE
au BufEnter * hi TabLine NONE au BufEnter * hi TabLine NONE

@ -110,7 +110,7 @@ M.general = { --{{{
opt.signcolumn="yes" opt.signcolumn="yes"
g.sign_column_enbaled = true g.sign_column_enbaled = true
end end
end, "toggle sign column" }, end, "toggle sign column" },
["<BS>z"] = { function() ["<BS>z"] = { function()
@ -129,6 +129,19 @@ M.general = { --{{{
-- option toggle cursor line -- option toggle cursor line
["<BS>l"] = { "<cmd> set cul!<CR>", "toggle cursor line" }, ["<BS>l"] = { "<cmd> set cul!<CR>", "toggle cursor line" },
-- toggle list mode (shows listchars)
-- ["<BS>L"] = { "<cmd> set list!<CR>", "toggle list mode" },
["<BS>L"] = { function()
if vim.o.list then
vim.o.list = false
require"theme.highlights".blankline()
else
vim.o.list = true
require"theme.highlights".show_blank_tabs()
end
end, "toggle list mode" },
["<BS>c"] = { "<cmd>cclose<CR><cmd>lclose<CR>", "close quickfix" }, ["<BS>c"] = { "<cmd>cclose<CR><cmd>lclose<CR>", "close quickfix" },

@ -77,7 +77,7 @@ opt.foldminlines = 2
opt.foldlevelstart = 1 opt.foldlevelstart = 1
opt.conceallevel=1 -- how to show text with :syn-conceal syntax opt.conceallevel=1 -- how to show text with :syn-conceal syntax
opt.list = true -- show tabs,trailing spaces and non-breakable spaces opt.list = false -- show tabs,trailing spaces and non-breakable spaces
opt.listchars = "tab: ,trail:,extends:#,nbsp:⋅,eol:" -- Highlight problematic whitespace opt.listchars = "tab: ,trail:,extends:#,nbsp:⋅,eol:" -- Highlight problematic whitespace
opt.diffopt:append("vertical") opt.diffopt:append("vertical")
opt.completeopt = "menu,menuone,noselect" opt.completeopt = "menu,menuone,noselect"

@ -66,7 +66,6 @@ M.plugins = {
} }
}, },
["nvim-treesitter/nvim-treesitter"] = require "custom.plugins.configs.treesitter", ["nvim-treesitter/nvim-treesitter"] = require "custom.plugins.configs.treesitter",
["lukas-reineke/indent-blankline.nvim"] = {},
} }
} }

@ -1,10 +1,14 @@
local M = {} local M = {}
M.override = { M.override = {
IndentBlanklineContextChar = { -- IndentBlanklineContextChar = {
fg = "baby_pink", -- fg = "baby_pink",
nocombine = true, -- nocombine = true,
}, -- },
-- IndentBlanklineChar= {
-- fg = "black",
-- nocombine = true,
-- },
Comment = { Comment = {
fg = "light_grey" fg = "light_grey"
}, },

@ -24,6 +24,7 @@ M.palette = {
noir_9 = "#222430", noir_9 = "#222430",
} }
local config = { local config = {
preset = 'slate', preset = 'slate',
colors = M.palette colors = M.palette
@ -37,10 +38,7 @@ M.setup = function()
base46.load_highlight "defaults" base46.load_highlight "defaults"
base46.load_highlight "statusline" base46.load_highlight "statusline"
base46.load_highlight(base46.turn_str_to_color(g_config.ui.hl_add)) base46.load_highlight(base46.turn_str_to_color(g_config.ui.hl_add))
require('theme.highlights') require('theme.highlights').setup()
end end
return M return M

@ -62,6 +62,7 @@ M.blankline = function()
options = load_override(options, "lukas-reineke/indent-blankline.nvim") options = load_override(options, "lukas-reineke/indent-blankline.nvim")
blankline.setup(options) blankline.setup(options)
require("theme.highlights").blankline()
end end
M.colorizer = function() M.colorizer = function()

@ -53,7 +53,7 @@ local plugins = {
}, },
["lukas-reineke/indent-blankline.nvim"] = { ["lukas-reineke/indent-blankline.nvim"] = {
lock = true, lock = false,
opt = true, opt = true,
setup = function() setup = function()
require("core.lazy_load").on_file_open "indent-blankline.nvim" require("core.lazy_load").on_file_open "indent-blankline.nvim"

@ -100,21 +100,12 @@ end
---@param full? boolean maximum zen ---@param full? boolean maximum zen
M.zenmode = function(full) M.zenmode = function(full)
opt.colorcolumn= '0' opt.colorcolumn= '0'
g.indent_blankline_show_current_context = false
local ok, indent = pcall(require, "indent_blankline")
if ok then
indent.refresh()
end
opt.listchars:remove("eol")
opt.listchars:append("tab: ")
vim.cmd("TSDisable highlight") vim.cmd("TSDisable highlight")
if full then if full then
vim.cmd("IndentBlanklineDisable")
opt.signcolumn = 'no' opt.signcolumn = 'no'
opt.number = false opt.number = false
opt.relativenumber = false opt.relativenumber = false
-- opt.listchars:append("tab: ")
-- opt.listchars:remove("eol")
opt.fillchars:append("eob: ")
opt.cmdheight = 0 opt.cmdheight = 0
end end
g.zenmode = true g.zenmode = true
@ -124,18 +115,11 @@ end
M.exitzen = function() M.exitzen = function()
opt.colorcolumn= '+0' opt.colorcolumn= '+0'
opt.signcolumn = 'yes' opt.signcolumn = 'yes'
g.indent_blankline_show_current_context = true
local ok, indent = pcall(require, "indent_blankline")
if ok then
indent.refresh()
end
opt.listchars:append("eol:")
opt.listchars:append("tab: ")
opt.number = true opt.number = true
opt.relativenumber = true opt.relativenumber = true
opt.fillchars:append("eob:")
opt.cmdheight = 1 opt.cmdheight = 1
g.zenmode = false g.zenmode = false
vim.cmd("IndentBlanklineEnable")
vim.cmd("TSEnable highlight") vim.cmd("TSEnable highlight")
end end

@ -3,83 +3,120 @@ local modifiers = require('colorbuddy.modifiers').modifiers
local blob42 = require("custom.themes.blob42") local blob42 = require("custom.themes.blob42")
Color.new("green", blob42.base_30.green) local import_theme_colors = function()
Color.new("yellow", blob42.base_30.yellow) for i, color in pairs(blob42.base_16) do
Color.new("sun", blob42.base_30.sun) Color.new(i, color)
Color.new("base03", blob42.base_16.base03) end
Color.new("dap_stop", "#ff4848") for i, color in pairs(blob42.base_30) do
Color.new("dap_virtual_text", "#f99540") Color.new(i, color)
end
end
-- text import_theme_colors()
Group.new("MatchWord", colors.primary, colors.noir_8, styles.bold)
Group.link("MatchParen", groups.MatchWord )
Group.new("Error", colors.primary, nil, styles.underline) -- 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", {})
local M = {}
-- search M.blankline = function()
-- select -- indentline
Group.new("IndentBlanklineChar", colors.background)
Group.new("IndentBlanklineContextChar", colors.primary)
end
-- menus M.show_blank_tabs = function()
Group.new("PmenuSel", nil, colors.noir_8 ) -- indentline
P("showing blank tabs")
Group.new("IndentBlanklineChar", colors.base01)
end
Group.new('LineNr', colors.gray2:light()) M.setup = function()
Group.new('CursorLineNr', colors.gray3)
Group.new('telescopepromptcounter', colors.gray3) -- text
Group.new('DiagnosticUnderlineError', colors.primary, nil, styles.underline) Group.new("MatchWord", colors.primary, colors.noir_8, styles.bold)
Group.link("MatchParen", groups.MatchWord )
-- Group.new("NonText", colors.background:light())
-- syntax / treesitter Group.new("Error", colors.primary, nil, styles.underline)
Group.new("Keyword", colors.primary, nil, styles.bold)
Group.link("@keyword", groups.Keyword)
Group.link("@keyword.function", groups.Keyword)
Group.link("@conditional", groups.Keyword)
Group.new("Type", colors.secondary, nil)
Group.link("@type", groups.Type)
Group.new("Macro", colors.primary) -- search
Group.link("@function.macro", groups.Macro) -- select
Group.new("String", colors.sun) -- menus
Group.link("@string", groups.String) Group.new("PmenuSel", nil, colors.noir_8 )
Group.new("@string.escape", colors.secondary)
Group.link("@constant.builtin", groups.Constant) Group.new('LineNr', colors.gray2:light())
Group.link("@constant", groups.Constant) Group.new('CursorLineNr', colors.gray3)
Group.new("@variable", colors.noir_0) Group.new('telescopepromptcounter', colors.gray3)
Group.new('DiagnosticUnderlineError', colors.primary, nil, styles.underline)
-- syntax / treesitter
Group.new("Keyword", colors.primary, nil, styles.bold)
Group.link("@keyword", groups.Keyword)
Group.link("@keyword.function", groups.Keyword)
Group.link("@conditional", groups.Keyword)
-- indentline Group.new("Return", colors.primary, nil)
Group.new("IndentBlanklineContextStart", colors.base03) Group.link("@keyword.return", groups.Return)
-- Dap
-- Migrating from nvchad custom added hilights Group.new("Type", colors.secondary, nil)
Group.new("DapStopped", colors.dap_stop) Group.link("@type", groups.Type)
Group.link("DapUIStop", groups.DapStopped)
Group.new("NvimDapVirtualText", colors.dap_virtual_text)
Group.new("DapUIWatchesEmpty", colors.secondary)
Group.new("Macro", colors.primary)
Group.link("@function.macro", groups.Macro)
Group.new("String", colors.orange)
-- Override specific highlight groups... Group.link("@string", groups.String)
-- Group.new('TelescopeTitle', colors.primary) Group.new("@string.escape", colors.secondary)
-- Group.new('TelescopeBorder', colors.secondary)
-- Group.new('CursorLineNr', colors.primary, colors.noir_9)
-- Group.new('Searchlight', nil, colors.secondary)
-- Group.new('@comment', colors.noir_7)
-- Group.new('@punctuation', colors.noir_2)
--
-- Add font styles to highlight groups...
-- Group.new('@constant', colors.noir_2, nil, styles.bold)
-- Group.new('@method', colors.noir_0, nil, styles.bold + styles.italic)
-- Link highlight groups... Group.link("@constant.builtin", groups.Constant)
-- Group.link('SignifySignAdd', groups.DiffAdd) Group.link("@constant", groups.Constant)
-- Group.link('SignifySignChange', groups.DiffChange)
-- Group.link('SignifySignDelete', groups.DiffDelete)
--
-- etc. Group.new("@variable", colors.noir_0)
-- defined in chadrc custom
-- Dap
-- Migrating from nvchad custom added hilights
Group.new("DapStopped", colors.dap_stop)
Group.link("DapUIStop", groups.DapStopped)
Group.new("NvimDapVirtualText", colors.dap_virtual_text)
Group.new("DapUIWatchesEmpty", colors.secondary)
-- Override specific highlight groups...
-- Group.new('TelescopeTitle', colors.primary)
-- Group.new('TelescopeBorder', colors.secondary)
-- Group.new('CursorLineNr', colors.primary, colors.noir_9)
-- Group.new('Searchlight', nil, colors.secondary)
-- Group.new('@comment', colors.noir_7)
-- Group.new('@punctuation', colors.noir_2)
--
-- Add font styles to highlight groups...
-- Group.new('@constant', colors.noir_2, nil, styles.bold)
-- Group.new('@method', colors.noir_0, nil, styles.bold + styles.italic)
-- Link highlight groups...
-- Group.link('SignifySignAdd', groups.DiffAdd)
-- Group.link('SignifySignChange', groups.DiffChange)
-- Group.link('SignifySignDelete', groups.DiffDelete)
--
-- etc.
end
return M

Loading…
Cancel
Save