From 6f6124e2a3bda2006c6bc0900da8707fb2306e00 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sun, 4 Aug 2024 23:23:07 +0200 Subject: [PATCH] nvim: schedule setting 'clipboard' after UIEnter Without scheduling, the startup time in WSL is slowed down by over a second! --- config/nvim/lua/fschauen/options.lua | 6 +++++- config/nvim/spell/en.utf-8.add | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/nvim/lua/fschauen/options.lua b/config/nvim/lua/fschauen/options.lua index a880ec1..a7da6f7 100644 --- a/config/nvim/lua/fschauen/options.lua +++ b/config/nvim/lua/fschauen/options.lua @@ -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 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. diff --git a/config/nvim/spell/en.utf-8.add b/config/nvim/spell/en.utf-8.add index e240014..2ca69c6 100644 --- a/config/nvim/spell/en.utf-8.add +++ b/config/nvim/spell/en.utf-8.add @@ -94,3 +94,4 @@ VnTCC VSC VTCC ε +rebase