Skip to content

Commit ed09efa

Browse files
performance: defer clipboard because xsel and pbcopy can be slow
1 parent 9dd2767 commit ed09efa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lua/options.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ vim.opt.mouse = 'a'
1515
-- Don't show the mode, since it's already in the status line
1616
vim.opt.showmode = false
1717

18-
-- Sync clipboard between OS and Neovim.
19-
-- Remove this option if you want your OS clipboard to remain independent.
20-
-- See `:help 'clipboard'`
21-
vim.opt.clipboard = 'unnamedplus'
18+
-- Schedule the setting after `UiEnter` because it can increase startup-time.
19+
vim.schedule(function()
20+
vim.opt.clipboard = 'unnamedplus'
21+
end)
2222

2323
-- Enable break indent
2424
vim.opt.breakindent = true

0 commit comments

Comments
 (0)