Skip to content

Commit

Permalink
chore(style): use globals to store borderstyle, a few more sec for hi…
Browse files Browse the repository at this point in the history
…ghlights
  • Loading branch information
pwnwriter committed Dec 14, 2024
1 parent 3710e98 commit 01ffc17
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
16 changes: 9 additions & 7 deletions lua/opts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ local g = vim.g
local opts = {}

opts.initial = function()
g.mapleader = " "
opt.laststatus = 3
opt.clipboard = "unnamedplus"
opt.termguicolors = true
Expand All @@ -19,6 +18,15 @@ opts.initial = function()
opt.swapfile = false
opt.undofile = true
opt.cmdheight = 0

g.border_style = "single" ---@type "single"|"double"|"rounded"
g.mapleader = " "

-- Disable providers
g.loaded_node_provider = 0
g.loaded_python3_provider = 0
g.loaded_perl_provider = 0
g.loaded_ruby_provider = 0
end

opts.final = function()
Expand Down Expand Up @@ -46,12 +54,6 @@ opts.final = function()
-- Statusline
local statusline_ascii = ""
opt.statusline = "%#Normal#" .. statusline_ascii .. "%="

-- Disable providers
g.loaded_node_provider = 0
g.loaded_python3_provider = 0
g.loaded_perl_provider = 0
g.loaded_ruby_provider = 0
end

--- Load shada after ui-enter
Expand Down
9 changes: 6 additions & 3 deletions lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ local plugins = {
completion = {
accept = { auto_brackets = { enabled = true } },
menu = {
border = 'single',
border = vim.g.border_style,
scrolloff = 1,
scrollbar = false,
columns = { { 'kind_icon' }, { 'label', 'label_description', gap = 0 } },
Expand All @@ -163,7 +163,7 @@ local plugins = {
auto_show_delay_ms = 0,
auto_show = true,
window = {
border = "single",
border = vim.g.border_style,
},
},
},
Expand Down Expand Up @@ -200,7 +200,10 @@ local plugins = {
},
event = { "BufReadPost" },
opts = {
words = { enabled = true },
words = {
enabled = true,
debounce = 500,
},
notifier = {
wo = {
winblend = 0,
Expand Down

0 comments on commit 01ffc17

Please sign in to comment.