aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-04-09 20:46:53 +0200
committerGitHub <noreply@github.com>2023-04-09 20:46:53 +0200
commit41b7586cbb947b3215489fd7445b9bfb6e7008d2 (patch)
treef6559a286ee1f17d864ba13cc428c4f7c444d329 /runtime/autoload
parent5d387c338828d176f335f2a9cec8882ecc4ba954 (diff)
downloadrneovim-41b7586cbb947b3215489fd7445b9bfb6e7008d2.tar.gz
rneovim-41b7586cbb947b3215489fd7445b9bfb6e7008d2.tar.bz2
rneovim-41b7586cbb947b3215489fd7445b9bfb6e7008d2.zip
refactor: rewrite clipboard provider healthchecks in Lua
This is required to remove the vimscript checkhealth functions.
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/health/provider2.vim (renamed from runtime/autoload/health/provider.vim)28
1 files changed, 1 insertions, 27 deletions
diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider2.vim
index 70f525156c..196a3ce9de 100644
--- a/runtime/autoload/health/provider.vim
+++ b/runtime/autoload/health/provider2.vim
@@ -122,31 +122,6 @@ function! s:download(url) abort
\ .'and `python`, cannot make web request'
endfunction
-" Check for clipboard tools.
-function! s:check_clipboard() abort
- call health#report_start('Clipboard (optional)')
-
- if !empty($TMUX) && executable('tmux') && executable('pbpaste') && !s:cmd_ok('pbpaste')
- let tmux_version = matchstr(system('tmux -V'), '\d\+\.\d\+')
- call health#report_error('pbcopy does not work with tmux version: '.tmux_version,
- \ ['Install tmux 2.6+. https://superuser.com/q/231130',
- \ 'or use tmux with reattach-to-user-namespace. https://superuser.com/a/413233'])
- endif
-
- let clipboard_tool = provider#clipboard#Executable()
- if exists('g:clipboard') && empty(clipboard_tool)
- call health#report_error(
- \ provider#clipboard#Error(),
- \ ["Use the example in :help g:clipboard as a template, or don't set g:clipboard at all."])
- elseif empty(clipboard_tool)
- call health#report_warn(
- \ 'No clipboard tool found. Clipboard registers (`"+` and `"*`) will not work.',
- \ [':help clipboard'])
- else
- call health#report_ok('Clipboard tool found: '. clipboard_tool)
- endif
-endfunction
-
" Get the latest Nvim Python client (pynvim) version from PyPI.
function! s:latest_pypi_version() abort
let pypi_version = 'unable to get pypi response'
@@ -745,8 +720,7 @@ function! s:check_perl() abort
endif
endfunction
-function! health#provider#check() abort
- call s:check_clipboard()
+function! health#provider2#check() abort
call s:check_python()
call s:check_virtualenv()
call s:check_ruby()