diff options
Diffstat (limited to 'runtime/autoload')
| -rw-r--r-- | runtime/autoload/health/nvim.vim | 11 | ||||
| -rw-r--r-- | runtime/autoload/health/provider.vim | 7 | ||||
| -rw-r--r-- | runtime/autoload/spellfile.vim | 14 |
3 files changed, 18 insertions, 14 deletions
diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim index efa3292801..8fcea2e941 100644 --- a/runtime/autoload/health/nvim.vim +++ b/runtime/autoload/health/nvim.vim @@ -170,6 +170,17 @@ function! s:check_tmux() abort \ ["Set default-terminal in ~/.tmux.conf:\nset-option -g default-terminal \"screen-256color\"", \ s:suggest_faq]) endif + + " check for RGB capabilities + let info = system('tmux server-info') + let has_tc = stridx(info, " Tc: (flag) true") != -1 + let has_rgb = stridx(info, " RGB: (flag) true") != -1 + if !has_tc && !has_rgb + call health#report_warn( + \ "Neither Tc nor RGB capability set. True colors are disabled. |'termguicolors'| won't work properly.", + \ ["Put this in your ~/.tmux.conf and replace XXX by your $TERM outside of tmux:\nset-option -sa terminal-overrides ',XXX:RGB'", + \ "For older tmux versions use this instead:\nset-option -ga terminal-overrides ',XXX:Tc'"]) + endif endfunction function! s:check_terminal() abort diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 8f364a2ace..29bbee4888 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -106,7 +106,8 @@ endfunction " Fetch the contents of a URL. function! s:download(url) abort - if executable('curl') + let has_curl = executable('curl') + if has_curl && system(['curl', '-V']) =~# 'Protocols:.*https' let rv = s:system(['curl', '-sL', a:url], '', 1, 1) return s:shell_error ? 'curl error with '.a:url.': '.s:shell_error : rv elseif executable('python') @@ -124,7 +125,9 @@ function! s:download(url) abort \ ? 'python urllib.request error: '.s:shell_error \ : rv endif - return 'missing `curl` and `python`, cannot make pypi request' + return 'missing `curl` ' + \ .(has_curl ? '(with HTTPS support) ' : '') + \ .'and `python`, cannot make web request' endfunction " Check for clipboard tools. diff --git a/runtime/autoload/spellfile.vim b/runtime/autoload/spellfile.vim index 9ec6091218..c0ef51cdfe 100644 --- a/runtime/autoload/spellfile.vim +++ b/runtime/autoload/spellfile.vim @@ -195,16 +195,6 @@ function! spellfile#GetDirChoices() endfunc function! spellfile#WritableSpellDir() - " Always use the $XDG_DATA_HOME/nvim/site directory - if exists('$XDG_DATA_HOME') - return $XDG_DATA_HOME . "/nvim/site/spell" - elseif !(has('win32') || has('win64')) - return $HOME . "/.local/share/nvim/site/spell" - endif - for dir in split(&rtp, ',') - if filewritable(dir) == 2 - return dir . "/spell" - endif - endfor - return '' + " Always use the $XDG_DATA_HOME/…/site directory + return stdpath('data').'/site/spell' endfunction |