refactor(nvim): global border styles
This commit is contained in:
parent
8083132fef
commit
ba48867642
9 changed files with 80 additions and 38 deletions
|
@ -36,15 +36,63 @@ vim.o.expandtab = true
|
|||
vim.o.signcolumn = "yes:1"
|
||||
-- hide search notices, intro
|
||||
vim.opt.shortmess:append("sI")
|
||||
-- double box drawing characters for splits
|
||||
vim.opt.fillchars:append({
|
||||
|
||||
local borderchars = {
|
||||
single = {
|
||||
style = "single",
|
||||
vert = "│",
|
||||
vertleft = "┤",
|
||||
vertright = "├",
|
||||
horiz = "─",
|
||||
horizup = "┴",
|
||||
horizdown = "┬",
|
||||
verthoriz = "┼",
|
||||
topleft = "┌",
|
||||
topright = "┐",
|
||||
botleft = "└",
|
||||
botright = "┘",
|
||||
},
|
||||
double = {
|
||||
style = "double",
|
||||
vert = "║",
|
||||
vertleft = "╣",
|
||||
vertright = "╠",
|
||||
horiz = "═",
|
||||
horizup = "╩",
|
||||
horizdown = "╦",
|
||||
vert = "║",
|
||||
vertright = "╠",
|
||||
vertleft = "╣",
|
||||
verthoriz = "╬",
|
||||
topleft = "╔",
|
||||
topright = "╗",
|
||||
botleft = "╚",
|
||||
botright = "╝",
|
||||
},
|
||||
rounded = {
|
||||
style = "rounded",
|
||||
vert = "│",
|
||||
vertleft = "┤",
|
||||
vertright = "├",
|
||||
horiz = "─",
|
||||
horizup = "┴",
|
||||
horizdown = "┬",
|
||||
verthoriz = "┼",
|
||||
topleft = "╭",
|
||||
topright = "╮",
|
||||
botleft = "╰",
|
||||
botright = "╯",
|
||||
},
|
||||
}
|
||||
|
||||
-- my custom borderchars
|
||||
vim.g.bc = borderchars.rounded
|
||||
-- drawing characters for splits
|
||||
vim.opt.fillchars:append({
|
||||
horiz = vim.g.bc.horiz,
|
||||
horizup = vim.g.bc.horizup,
|
||||
horizdown = vim.g.bc.horizdown,
|
||||
vert = vim.g.bc.vert,
|
||||
vertright = vim.g.bc.vertright,
|
||||
vertleft = vim.g.bc.vertleft,
|
||||
verthoriz = vim.g.bc.verthoriz,
|
||||
})
|
||||
|
||||
if vim.g.neovide then
|
||||
|
|
|
@ -65,7 +65,7 @@ M.setup = function(plugins)
|
|||
start = " ",
|
||||
task = " ",
|
||||
},
|
||||
border = "double",
|
||||
border = vim.g.bc.style,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
|
|
@ -13,10 +13,19 @@ vim.lsp.set_log_level("error")
|
|||
-- border style
|
||||
require("lspconfig.ui.windows").default_options.border = "double"
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = "double",
|
||||
border = vim.g.bc.style,
|
||||
})
|
||||
local cmp_borders = {
|
||||
border = { "╔", "═", "╗", "║", "╝", "═", "╚", "║" },
|
||||
border = {
|
||||
vim.g.bc.topleft,
|
||||
vim.g.bc.horiz,
|
||||
vim.g.bc.topright,
|
||||
vim.g.bc.vert,
|
||||
vim.g.bc.botright,
|
||||
vim.g.bc.horiz,
|
||||
vim.g.bc.botleft,
|
||||
vim.g.bc.vert,
|
||||
},
|
||||
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ return {
|
|||
filetype = "NvimTree",
|
||||
text = " neovim " .. vStr,
|
||||
text_align = "left",
|
||||
separator = "║",
|
||||
separator = vim.g.bc.vert,
|
||||
},
|
||||
},
|
||||
left_mouse_command = "buffer %d",
|
||||
|
|
|
@ -77,22 +77,7 @@ return {
|
|||
FidgetTask = { fg = colors.subtext0 },
|
||||
}
|
||||
end,
|
||||
-- mocha = function(colors)
|
||||
-- return {
|
||||
-- Selection = { bg = "#121212", fg = colors.text },
|
||||
-- Comment = { fg = colors.surface2, style = { "italic" } },
|
||||
-- InlayHint = { fg = colors.surface0, style = { "italic" } },
|
||||
-- WinSeparator = { fg = colors.surface2 },
|
||||
-- }
|
||||
-- end,
|
||||
},
|
||||
-- color_overrides = {
|
||||
-- mocha = {
|
||||
-- base = "#000000",
|
||||
-- crust = "#010101",
|
||||
-- mantle = "#020202",
|
||||
-- },
|
||||
-- },
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
|
|
|
@ -12,7 +12,7 @@ return {
|
|||
function(...)
|
||||
local opts = stages[1](...)
|
||||
if opts then
|
||||
opts.border = "double"
|
||||
opts.border = vim.g.bc.style
|
||||
end
|
||||
return opts
|
||||
end,
|
||||
|
|
|
@ -14,7 +14,7 @@ return {
|
|||
actions = {
|
||||
file_popup = {
|
||||
open_win_config = {
|
||||
border = "double",
|
||||
border = vim.g.bc.style,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -16,14 +16,14 @@ return {
|
|||
defaults = {
|
||||
selection_caret = "▶ ",
|
||||
borderchars = {
|
||||
"═",
|
||||
"║",
|
||||
"═",
|
||||
"║",
|
||||
"╔",
|
||||
"╗",
|
||||
"╝",
|
||||
"╚",
|
||||
vim.g.bc.horiz,
|
||||
vim.g.bc.vert,
|
||||
vim.g.bc.horiz,
|
||||
vim.g.bc.vert,
|
||||
vim.g.bc.topleft,
|
||||
vim.g.bc.topright,
|
||||
vim.g.bc.botright,
|
||||
vim.g.bc.botleft,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
|
|
|
@ -14,7 +14,7 @@ return {
|
|||
["<esc>"] = "⎋ ",
|
||||
},
|
||||
window = {
|
||||
border = "double",
|
||||
border = vim.g.bc.style,
|
||||
margin = { 0, 0, 0, 0 },
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue