move bufferline highlights in different file

This commit is contained in:
siduck76 2021-06-05 22:10:23 +05:30
parent acb70a6581
commit 39b165a8e5
3 changed files with 119 additions and 72 deletions

View File

@ -24,7 +24,7 @@ cmd "syntax on"
local base16 = require "base16" local base16 = require "base16"
base16(base16.themes["onedark"], true) base16(base16.themes["onedark"], true)
require "custom_highlights" require "colors"
-- blankline -- blankline

118
lua/colors.lua Normal file
View File

@ -0,0 +1,118 @@
local cmd = vim.cmd
-- blankline
cmd "hi IndentBlanklineChar guifg=#282c34"
-- misc --
cmd "hi LineNr guifg=#42464e"
cmd "hi Comment guifg=#42464e"
cmd "hi NvimInternalError guifg=#f9929b"
cmd "hi VertSplit guifg=#2a2e36"
cmd "hi EndOfBuffer guifg=#1e222a"
-- Pmenu
cmd "hi PmenuSel guibg=#98c379"
cmd "hi Pmenu guibg=#282c34"
cmd "hi PmenuSbar guibg =#353b45"
cmd "hi PmenuThumb guibg =#81A1C1"
-- inactive statuslines as thin splitlines
cmd("highlight! StatusLineNC gui=underline guifg=#383c44")
-- line n.o
cmd "hi clear CursorLine"
cmd "hi cursorlinenr guifg=#abb2bf"
-- git signs ---
cmd "hi DiffAdd guifg=#81A1C1 guibg = none"
cmd "hi DiffChange guifg =#3A3E44 guibg = none"
cmd "hi DiffModified guifg = #81A1C1 guibg = none"
-- NvimTree
cmd "hi NvimTreeFolderIcon guifg = #61afef"
cmd "hi NvimTreeFolderName guifg = #61afef"
cmd "hi NvimTreeIndentMarker guifg=#383c44"
cmd "hi NvimTreeNormal guibg=#1b1f27"
cmd "hi NvimTreeVertSplit guifg=#1e222a"
cmd "hi NvimTreeRootFolder guifg=#1b1f27"
-- telescope
cmd "hi TelescopeBorder guifg=#2a2e36"
cmd "hi TelescopePromptBorder guifg=#2a2e36"
cmd "hi TelescopeResultsBorder guifg=#2a2e36"
cmd "hi TelescopePreviewBorder guifg=#525865"
-- LspDiagnostics ---
-- error / warnings
cmd "hi LspDiagnosticsSignError guifg=#f9929b"
cmd "hi LspDiagnosticsVirtualTextError guifg=#BF616A"
cmd "hi LspDiagnosticsSignWarning guifg=#EBCB8B"
cmd "hi LspDiagnosticsVirtualTextWarning guifg=#EBCB8B"
-- info
cmd "hi LspDiagnosticsSignInformation guifg=#A3BE8C"
cmd "hi LspDiagnosticsVirtualTextInformation guifg=#A3BE8C"
-- hint
cmd "hi LspDiagnosticsSignHint guifg=#b6bdca"
cmd "hi LspDiagnosticsVirtualTextHint guifg=#b6bdca"
-- bufferline
local function add_hi(item, fg, bg)
local buf_hi = "hi BufferLine" .. item .. " guifg=" .. fg .. " guibg=" .. bg
if item == "BufferSelected" then
vim.cmd(buf_hi .. " gui=bold")
else
vim.cmd(buf_hi)
end
end
local function bufferline_colors()
-- colors ---
local fg = "#565c64"
local bg = "#252931"
-- active buffer
local darkerBg = "#1e222a" -- nvim's bg
local activeBuffer_fg = "#c8ccd4"
-- unfocused opened buffer
local grey_dark = "#9298a0"
-- tabs
local bg2 = "#30343c" -- should be lighter than bg
local red = "#d47d85"
-- modified buffers
local green = "#A3BE8C"
add_hi("Background", fg, bg)
add_hi("Fill", fg, bg)
add_hi("BufferSelected", activeBuffer_fg, darkerBg)
add_hi("BufferVisible", grey_dark, bg)
add_hi("Tab", grey_dark, bg2)
add_hi("TabSelected", bg, "#81A1C1")
add_hi("TabClose", red, bg)
-- making separates transparent
add_hi("Indicator", bg, bg)
add_hi("IndicatorSelected", bg, bg)
add_hi("Separator", bg, bg)
add_hi("SeparatorVisible", bg, bg)
add_hi("SeparatorSelected", darkerBg, darkerBg)
-- modified buffers
add_hi("Modified", red, bg)
add_hi("ModifiedVisible", red, bg)
add_hi("ModifiedSelected", green, darkerBg)
end
bufferline_colors()

View File

@ -1,8 +1,3 @@
-- define some colors
local bar_fg = "#565c64"
local activeBuffer_fg = "#c8ccd4"
require "bufferline".setup { require "bufferline".setup {
options = { options = {
offsets = {{filetype = "NvimTree", text = ""}}, offsets = {{filetype = "NvimTree", text = ""}},
@ -20,72 +15,6 @@ require "bufferline".setup {
show_buffer_close_icons = true, show_buffer_close_icons = true,
separator_style = "thin", separator_style = "thin",
mappings = "true" mappings = "true"
},
-- bar colors!!
highlights = {
fill = {
guifg = bar_fg,
guibg = "#252931"
},
background = {
guifg = bar_fg,
guibg = "#252931"
},
-- buffer
buffer_selected = {
guifg = activeBuffer_fg,
guibg = "#1e222a",
gui = "bold"
},
buffer_visible = {
guifg = "#9298a0",
guibg = "#252931"
},
-- tabs over right
tab = {
guifg = "#9298a0",
guibg = "#30343c"
},
tab_selected = {
guifg = "#30343c",
guibg = "#9298a0"
},
tab_close = {
guifg = "#d47d85",
guibg = "#252931"
},
-- buffer separators
separator = {
guifg = "#252931",
guibg = "#252931"
},
separator_selected = {
guifg = "#1e222a",
guibg = "#1e222a"
},
separator_visible = {
guifg = "#252931",
guibg = "#252931"
},
indicator_selected = {
guifg = "#252931",
guibg = "#252931"
},
-- modified files (but not saved)
modified_selected = {
guifg = "#A3BE8C",
guibg = "#1e222a"
},
modified_visible = {
guifg = "#BF616A",
guibg = "#23272f"
}
} }
} }