Commit Graph

98 Commits

Author SHA1 Message Date
Justin M. Keyes
73c6bf3879 health.vim: On error, show a valid shell command.
Helped-by: Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>
Closes #6715
2017-05-11 14:20:57 +02:00
Edd Barrett
bc4fd8b10d health.vim: Fix hardcoded python name. #6714 2017-05-11 12:01:56 +02:00
Justin M. Keyes
d9023b84e6 health.vim: Remove sensible.vim advice. (#6709)
sensible.vim now avoids setting ttimeoutlen for nvim.
2017-05-10 09:43:17 +02:00
Justin M. Keyes
51a2d8dc36 win: health.vim/check_ruby(): find gem.cmd #6608
gem.cmd is not found by system(['gem', ...]), pass it to cmd.exe.
2017-04-29 01:57:09 +02:00
Daniel Hahler
59be0b4280 health.vim: syntax/style fixes (#6614) 2017-04-28 23:18:10 +02:00
TJ DeVries
19646a2985 health.vim: 'guicursor' advice #6506
Also:
- Mark provider sections as "(optional)".
- Fix help-link substitution to support single-quoted tags.
2017-04-20 22:44:51 +02:00
Justin M. Keyes
440133e0d5 health.vim: Set 'iskeyword' to that of ft=help. 2017-04-19 04:03:08 +02:00
Justin M. Keyes
6fbcbebae0 win: health/provider.vim: check with .exe extension
Also fix `python_multiple` comparison.
2017-03-28 01:49:36 +02:00
Tommy Allen
a62ec4eb98 health.vim: tmux: Try -qvg and -qvgs (#6348) 2017-03-24 01:38:01 +01:00
Justin M. Keyes
e5be3aaaef health.vim: tmux $TERM, default-terminal 2017-03-06 03:17:40 +01:00
Justin M. Keyes
2f38ed11c9 providers: Disable if g:loaded_* exists.
The exists('g:loaded_foo') convention is rather common, and may be
relied upon in some cases. It's also very unlikely that a user or plugin
has any reason to set g:loaded_foo to zero, so the principle of least
surprise can be brushed aside here.

https://github.com/neovim/neovim/issues/6107#issuecomment-279532143
2017-02-14 00:02:50 +01:00
Justin M. Keyes
9451647d9b health.vim: Do not check intentionally disabled providers.
Closes #6107
2017-02-13 22:21:23 +01:00
Justin M. Keyes
f50de5be41 health.vim: ruby provider advice 2017-02-12 12:51:54 +01:00
Justin M. Keyes
611411bf85 CheckHealth: choose correct $PATH separator 2017-02-04 11:07:49 +01:00
Daniel Hahler
35988b93e1 healthcheck: s:download: do not report curl errors (twice)
Since `curl -s` is used, the actual error (e.g. "curl: (6) Could not
resolve host: pypi.python.org") gets not reported anyway, and s:download
returns an error message with `s:shell_error` already.
This changes `s:download` to also include `a:url` in the error message
now.

It removes

> ERROR: Command error (7) curl -sL https://pypi.python.org/pypi/neovim/json:

And changes

> ERROR: HTTP request failed: error: curl error with https://pypi.python.org/pypi/neovim/json: 6
2017-01-08 23:26:47 +01:00
Daniel Hahler
7db0017f4e healthcheck: s:check_python: only report latest with good response 2017-01-08 23:26:47 +01:00
Daniel Hahler
adf32e1403 healthcheck: python: prefer neovim.VERSION 2017-01-08 23:26:46 +01:00
Daniel Hahler
5ce50504f9 healthcheck: python: include nvim path for unknown/outdated version
This helps to identify where the `neovim` module is coming from, e.g.

    - INFO: python3-neovim version: 0.1.10 (outdated; from ~/Vcs/neovim-python-client/neovim)
    - WARNING: Latest python3-neovim is NOT installed: 0.1.12
2017-01-08 23:26:46 +01:00
Daniel Hahler
0583ca63a5 Improve error reporting for Python health check
- s:version_info: return errors from the `import`
 - skip report_ok for latest version, in case the current version was
   not found.  status contains the error that has been reported in that
   case already.
2017-01-08 23:26:42 +01:00
Daniel Hahler
339dd4b1fb s:check_python: handle 'pip install --user -e' 2017-01-08 23:25:45 +01:00
Justin M. Keyes
e7b1b5d6ed health: Windows: Handle backslash path separators. (#5914)
* health: Handle backslash path separators.
* health: brevity, consistency
* health: Do not set bufhidden=wipe.
  In the context of CheckHealth, bufhidden=wipe loses data for no reason.
2017-01-08 21:26:00 +01:00
Marco Hinz
ca7a5c0ce7
ruby: old versions don't know gem list -e 2017-01-08 00:44:48 +01:00
Marco Hinz
40c76741c1 health: refactor s:check_ruby()
I gone through every single line, renamed the variables to be more consistent
and reordered many lines. Information is now printed as soon as it's available
and errors lead to early returns.

I altered the suggestions for each condition to be more precise and checked that
they fail properly.

This also prevents invalid arguments getting passed to s:version_cmp().
2017-01-07 16:56:38 +01:00
ooora
9066e23562 man.vim, provider.vim: Avoid shell syntax. #5734
- Improves compatibility with shell=tcsh.
- man.vim: split read_page into get_page, put_page. Do not split the
  window until we know there is going to be output.
2016-12-27 23:26:06 +01:00
Justin M. Keyes
657369bb68 CheckHealth: terminfo: remove "kbs" advice 2016-12-23 18:28:54 +01:00
Marco Hinz
5855f30cb1 Make VimL code compatible with merged Partial support (#5765)
Closes #5763.
2016-12-13 14:48:42 +01:00
Justin M. Keyes
100a8d40db CheckHealth: more precise check for sensible.vim
Closes #5751
2016-12-11 01:26:49 +01:00
Marco Hinz
20995c7960 Remove g:python{,3}_host_skip_check (#5738)
This option simplifies the configuration options:

1) `g:python{,3}_host_prog` is not set.

    Neovim tries its best to find a suitable interpreter. This means calling
    exepath(), potentially multiple times, and a system('python -c ...') with
    the first found interpreter, to get the Python version.

2) `g:python{,3}_host_prog` is set.

    Avoids everything of the above. No safety checks, no training wheels. Fast
    host startup time!
2016-12-09 15:08:18 +01:00
Marco Hinz
7666b4950e Health: show :help + tags (#5719) 2016-12-05 13:01:47 +01:00
Justin M. Keyes
d28d108648 CheckHealth: Fix version comparison.
Compare numbers instead of strings.
2016-11-15 13:15:40 +01:00
Tommy Allen
84eed76b55 CheckHealth: Include v:throwpoint in error message (#5575)
* health.vim: Include v:throwpoint in error message

* health/provider.vim: Check for ruby executable

* health/provider.vim: Combine subprocess stdout and stderr

* test: Updated CheckHealth test
2016-11-12 11:59:15 +01:00
Tommy Allen
3089c86f4e CheckHealth: timeout system() calls (#5565) 2016-11-08 14:34:03 +01:00
Marco Hinz
32d9c19e29 Health: introduce help links (#5557)
We can now use help links like in normal help pages. The bars around them will
be concealed as well.

* Health: link string "SUCCESS" to ModeMsg

So far we linked "SUCCESS" to the Function highlight group.

The newly introduced healthHelp group links to Idenfifier as it does for links
in normal help pages.

Now the problem is that the Function group links again to Identifier as well, so
both, "SUCCESS" and help links, would use the same colors.

* Health: don't use Markdown code blocks

Every line indented by more than 4 spaces would lose its highlighting otherwise.

* Health: add helper health#help_to_link()
2016-11-04 11:03:05 +01:00
Marco Hinz
797d72a997 health/provider.vim: add clipboard check 2016-11-02 12:06:54 +01:00
J Phani Mahesh
3d49fc1f50 CheckHealth: fix check for tmux escape-time (#5545) 2016-10-29 14:48:19 +02:00
Justin M. Keyes
fb4d5b0516 CheckHealth: check for sensible.vim 2016-10-28 13:54:08 +02:00
Justin M. Keyes
c853fd6fab CheckHealth: more checks 2016-10-25 15:55:29 +02:00
Justin M. Keyes
acdc0b1955 CheckHealth: check terminfo 2016-10-16 18:14:24 +02:00
Justin M. Keyes
c40b3b680d CheckHealth: check tmux configuration 2016-10-16 18:08:53 +02:00
Justin M. Keyes
819b79dbc5 health/provider.vim: Pass errors through. Give more feedback. 2016-10-13 17:55:15 +02:00
Justin M. Keyes
294c0ba014 health/provider.vim: Fix system([]) invocations.
Closes #5435
2016-10-13 15:17:24 +02:00
Marco Hinz
31f6334aa8 CheckHealth: choose correct path for the latest version (#5446)
If multiple versions of a package are installed, the provider health check could
choose a wrong path:

  /usr/local/lib/python3.5/site-packages/neovim-0.1.10-py3.5.egg-info/PKG-INFO
  /usr/local/lib/python3.5/site-packages/neovim-0.1.9-py3.5.egg-info/PKG-INFO

Prior to this change :CheckHealth could falsely show 0.1.9 as the installed
version, since glob() doesn't enforce any predictable order.

Now we sort all potential paths numerically in descending order and just look at
the first path instead.
2016-10-08 16:34:54 +02:00
Mark Lee
a8f9d56796 health: fix Python 2 variable names 2016-10-06 22:09:36 -07:00
Mark Lee
153e6835f1 health: remove duplicate nvim_path declaration
It's the same as the declaration above it, but hardcoded to use python3
and does not redirect stderr.
2016-10-06 22:09:10 -07:00
Justin M. Keyes
31257b450b health.vim: Factor out health#provider#check() 2016-09-05 18:29:47 -04:00
Alex Genco
d61a50758c Improve Ruby version check in CheckHealth command
Compare current version number to that of the latest released neovim
rubygem, rather than a hard-coded version.

Note: The `gem list` command introduced here adds about 4 seconds to the
execution time of the CheckHealth command.
2016-09-04 21:26:21 -07:00
Justin M. Keyes
545e7a4163 CheckHealth
- Overlay markdown syntax/filetype, don't invent new filetypes/syntaxes.
- migrate s:check_ruby()
- s:indent_after_line1
- Less-verbose output
2016-08-21 21:25:33 -04:00
TJ DeVries
2cc523c3af CheckHealth
- Use execute() instead of redir
- Fixed logic on suboptimal pyenv/virtualenv checks.
- Move system calls from strings to lists. Fixes #5218
- Add highlighting
- Automatically discover health checkers
- Add tests

Helped-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Helped-by: Tommy Allen <tommy@esdf.io>

Closes #4932
2016-08-21 21:25:33 -04:00