nvim: schedule setting 'clipboard' after UIEnter

Without scheduling, the startup time in WSL is slowed down by over
a second!
This commit is contained in:
Fernando Schauenburg 2024-08-04 23:23:07 +02:00
parent 824089b6ba
commit 6f6124e2a3
2 changed files with 6 additions and 1 deletions

View file

@ -19,12 +19,16 @@ M.setup = function()
-- General
o.belloff = "all" -- never ring bells
o.hidden = true -- hide abandoned buffers
o.clipboard = "unnamedplus" -- synchronize with system clipboard
o.lazyredraw = true -- don"t redraw screen during macros
o.modelines = 0 -- never use modelines
o.fileformats = "unix,mac,dos" -- prioritize unix <EOL> format
o.winblend = 8 -- minimum transparency for floating windows
-- Schedule the setting after `UiEnter` because it can increase startup-time.
vim.schedule(function()
o.clipboard = "unnamedplus" -- synchronize with system clipboard
end)
o.swapfile = false -- don"t use swap files
o.writebackup = true -- Make a backup before writing a file...
o.backup = false -- ...but don"t keep it around.

View file

@ -94,3 +94,4 @@ VnTCC
VSC
VTCC
ε
rebase