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"
|
vim.o.signcolumn = "yes:1"
|
||||||
-- hide search notices, intro
|
-- hide search notices, intro
|
||||||
vim.opt.shortmess:append("sI")
|
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 = "═",
|
horiz = "═",
|
||||||
horizup = "╩",
|
horizup = "╩",
|
||||||
horizdown = "╦",
|
horizdown = "╦",
|
||||||
vert = "║",
|
|
||||||
vertright = "╠",
|
|
||||||
vertleft = "╣",
|
|
||||||
verthoriz = "╬",
|
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
|
if vim.g.neovide then
|
||||||
|
|
|
@ -65,7 +65,7 @@ M.setup = function(plugins)
|
||||||
start = " ",
|
start = " ",
|
||||||
task = " ",
|
task = " ",
|
||||||
},
|
},
|
||||||
border = "double",
|
border = vim.g.bc.style,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,10 +13,19 @@ vim.lsp.set_log_level("error")
|
||||||
-- border style
|
-- border style
|
||||||
require("lspconfig.ui.windows").default_options.border = "double"
|
require("lspconfig.ui.windows").default_options.border = "double"
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||||
border = "double",
|
border = vim.g.bc.style,
|
||||||
})
|
})
|
||||||
local cmp_borders = {
|
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",
|
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ return {
|
||||||
filetype = "NvimTree",
|
filetype = "NvimTree",
|
||||||
text = " neovim " .. vStr,
|
text = " neovim " .. vStr,
|
||||||
text_align = "left",
|
text_align = "left",
|
||||||
separator = "║",
|
separator = vim.g.bc.vert,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
left_mouse_command = "buffer %d",
|
left_mouse_command = "buffer %d",
|
||||||
|
|
|
@ -77,22 +77,7 @@ return {
|
||||||
FidgetTask = { fg = colors.subtext0 },
|
FidgetTask = { fg = colors.subtext0 },
|
||||||
}
|
}
|
||||||
end,
|
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")
|
vim.cmd.colorscheme("catppuccin")
|
||||||
|
|
|
@ -12,7 +12,7 @@ return {
|
||||||
function(...)
|
function(...)
|
||||||
local opts = stages[1](...)
|
local opts = stages[1](...)
|
||||||
if opts then
|
if opts then
|
||||||
opts.border = "double"
|
opts.border = vim.g.bc.style
|
||||||
end
|
end
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -14,7 +14,7 @@ return {
|
||||||
actions = {
|
actions = {
|
||||||
file_popup = {
|
file_popup = {
|
||||||
open_win_config = {
|
open_win_config = {
|
||||||
border = "double",
|
border = vim.g.bc.style,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,14 +16,14 @@ return {
|
||||||
defaults = {
|
defaults = {
|
||||||
selection_caret = "▶ ",
|
selection_caret = "▶ ",
|
||||||
borderchars = {
|
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 = {
|
extensions = {
|
||||||
|
|
|
@ -14,7 +14,7 @@ return {
|
||||||
["<esc>"] = "⎋ ",
|
["<esc>"] = "⎋ ",
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
border = "double",
|
border = vim.g.bc.style,
|
||||||
margin = { 0, 0, 0, 0 },
|
margin = { 0, 0, 0, 0 },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue