1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

do not set clipboard when no provider is found

When there is no clipboard provider but we set the `clipboard` option, using
the `:yank` command will produce a warning message. We need to check if
a clipboard provider exists before setting up the clipboard option, see also
[this issue](https://github.com/neovim/neovim/issues/12305).
This commit is contained in:
jdhao 2020-05-13 14:54:32 +08:00 committed by GitHub
parent dd20d92a2f
commit 8f05c163a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,9 @@ set updatetime=2000
" Clipboard settings, always use clipboard for all delete, yank, change, put
" operation, see https://stackoverflow.com/q/30691466/6064933
set clipboard+=unnamedplus
if !empty(provider#clipboard#Executable())
set clipboard+=unnamedplus
endif
" Disable creating swapfiles, see https://stackoverflow.com/q/821902/6064933
set noswapfile