summaryrefslogtreecommitdiffstats
path: root/nvim/init.lua
diff options
context:
space:
mode:
authorabeldekat <58370433+abeldekat@users.noreply.github.com>2024-07-28 21:41:34 +0000
committerGitHub <noreply@github.com>2024-07-28 17:41:34 -0400
commit58df066c992aa43e95e8779ede55bb3dff6e945c (patch)
tree6b28b1a83cceab72898c74ea9fbbf51e4bbdf609 /nvim/init.lua
parentee71259ccd892a49ce3bb68d7b80527f4707f658 (diff)
downloaddots-58df066c992aa43e95e8779ede55bb3dff6e945c.tar.gz
performance: defer clipboard because xsel and pbcopy can be slow (#1049)
Diffstat (limited to 'nvim/init.lua')
-rw-r--r--nvim/init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/nvim/init.lua b/nvim/init.lua
index 5f442b6..ee1d3b4 100644
--- a/nvim/init.lua
+++ b/nvim/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