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:
parent
824089b6ba
commit
6f6124e2a3
2 changed files with 6 additions and 1 deletions
|
@ -19,12 +19,16 @@ M.setup = function()
|
||||||
-- General
|
-- General
|
||||||
o.belloff = "all" -- never ring bells
|
o.belloff = "all" -- never ring bells
|
||||||
o.hidden = true -- hide abandoned buffers
|
o.hidden = true -- hide abandoned buffers
|
||||||
o.clipboard = "unnamedplus" -- synchronize with system clipboard
|
|
||||||
o.lazyredraw = true -- don"t redraw screen during macros
|
o.lazyredraw = true -- don"t redraw screen during macros
|
||||||
o.modelines = 0 -- never use modelines
|
o.modelines = 0 -- never use modelines
|
||||||
o.fileformats = "unix,mac,dos" -- prioritize unix <EOL> format
|
o.fileformats = "unix,mac,dos" -- prioritize unix <EOL> format
|
||||||
o.winblend = 8 -- minimum transparency for floating windows
|
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.swapfile = false -- don"t use swap files
|
||||||
o.writebackup = true -- Make a backup before writing a file...
|
o.writebackup = true -- Make a backup before writing a file...
|
||||||
o.backup = false -- ...but don"t keep it around.
|
o.backup = false -- ...but don"t keep it around.
|
||||||
|
|
|
@ -94,3 +94,4 @@ VnTCC
|
||||||
VSC
|
VSC
|
||||||
VTCC
|
VTCC
|
||||||
ε
|
ε
|
||||||
|
rebase
|
||||||
|
|
Loading…
Add table
Reference in a new issue