From 84cc12354dbe0ebda180d445f54820def8c4638f Mon Sep 17 00:00:00 2001 From: abeldekat <58370433+abeldekat@users.noreply.github.com> Date: Sun, 28 Jul 2024 21:41:34 +0000 Subject: performance: defer clipboard because xsel and pbcopy can be slow (#1049) --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 5f442b6..ee1d3b4 100644 --- a/init.lua +++ b/init.lua @@ -111,9 +111,12 @@ vim.opt.mouse = 'a' vim.opt.showmode = false -- Sync clipboard between OS and Neovim. +-- Schedule the setting after `UiEnter` because it can increase startup-time. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -vim.opt.clipboard = 'unnamedplus' +vim.schedule(function() + vim.opt.clipboard = 'unnamedplus' +end) -- Enable break indent vim.opt.breakindent = true -- cgit v1.2.3