Commit Graph

98 Commits

Author SHA1 Message Date
Yoshio S
45447e3b64 checkhealth: skip python checks if intentionally disabled #11044
close #11040
2019-09-21 16:17:22 -07:00
Daniel Hahler
d478542110
health#provider: fix duplicated output/stderr (#11048)
Ref: https://github.com/neovim/neovim/pull/11047#issuecomment-532268826
2019-09-18 18:21:44 +02:00
Justin M. Keyes
e952b7fc2f health.vim: check has("debug") 2019-08-04 13:23:46 +02:00
ObserverOfTime
c38862acea checkhealth: try yarn if npm is missing #10490
fixes #10489
2019-07-14 20:48:53 +02:00
Justin M. Keyes
5ae57b7e57
health.vim: check shada file #10327
closes #1202
2019-06-25 01:31:41 +02:00
erw7
d0fd66ba82 health/provider.vim: check curl HTTPS support
closes #9925
closes #9928
2019-04-22 21:05:39 +02:00
Marco Hinz
43356a43d0
health: check if tmux enabled true colors (#9929)
References https://github.com/neovim/neovim/issues/7764
2019-04-20 19:02:19 +02:00
Justin M. Keyes
ec5a4d862d
checkhealth: validate locale (#9548)
Test case:

    LANG= LC_ALL= LC_CTYPE= tmux
    nvim -u NORC +'checkhealth nvim'
2019-01-26 00:41:42 +01:00
Marco Hinz
75593e6fce
health/pythonx: handle "pip upgrade failure"
Reference: https://github.com/neovim/neovim/wiki/Following-HEAD#20181118
2019-01-07 23:29:46 +01:00
Marco Hinz
eb91101a46
health/pythonx: refactor #Detect() 2019-01-07 19:58:33 +01:00
Marco Hinz
7f27e14a6e
health/pythonx: refactor pyenv check 2019-01-07 19:58:33 +01:00
James McCoy
d7b3ac029c
health/provider: Check for available pynvim when neovim module missing
Adapt the checks so we can still report when the pynvim module is
present but the neovim module is missing.
2019-01-01 20:38:28 -05:00
James McCoy
0dd89cda9c
{health,provider}/python: Import the neovim, rather than pynvim, module
The neovim module is available for backwards compatibility.  We should
not yet force the use of the pynvim module, since there's no other major
reason to bump the minimum supported Python client module.

Closes #9426
2019-01-01 14:15:31 -05:00
Marco Hinz
f1a787d292
health/python: warn if pynvim upgrade failed
Reference: https://github.com/neovim/neovim/wiki/Following-HEAD#20181118
2018-11-20 11:33:08 +01:00
Marco Hinz
57fef7c74d
health/python: slightly improve output 2018-11-20 09:59:18 +01:00
Marco Hinz
3ea14d5366
health/python: 'neovim' module was renamed to 'pynvim' 2018-11-17 17:56:34 +01:00
Justin M. Keyes
a8b4d76a0a health.vim: Detect missing init.vim
closes #4877
2018-08-27 01:35:58 +02:00
Daniel Hahler
a4494b7cbc checkhealth: always report stderr with errors (#8783)
This also reports the exit code (e.g. 127 for when pyenv-which fails).
2018-07-29 01:46:59 +02:00
Daniel Hahler
ade88fe4cc checkhealth: do not use exepath with host_prog (#8784)
This would need to get `expand`ed to not become empty, and is being
handled by s:check_bin already.

`s:check_bin` will also complain about e.g.
"~/.pyenv/versions/3.6.6/bin/python" not being executable, but that
reflects that the host will fail to start with it.

Fixes #8778
2018-07-29 01:44:46 +02:00
Daniel Hahler
bf6048e81d checkhealth: Python: fix VIRTUAL_ENV check (#8628)
Compare `$VIRTUAL_ENV` to `python_bin`.
This is necessary when `g:python_host_prog` is set to an absolute path,
and looking up `pyname` in `$PATH` yields another result.
2018-06-24 10:28:21 +02:00
Ahmed El Gabri
3cc3506965 checkhealth: node.js: also search yarn #8528
- "neovim" package may be installed with yarn. Check yarn if npm fails.
- Use filereadable() instead of glob(). closes #8552
2018-06-17 13:05:55 +02:00
Colin Yates
c69ea3b4b8 checkhealth: fix nodejs provider advice (#8522)
closes #8515
2018-06-10 20:09:10 +02:00
Daniel Hahler
1f2301eacf health#provider: fix sys.path for Python
Remove "" from sys.path (typically the first entry), which could cause
e.g. "logging" to be added from the current directory.
This gets done already for loading the host in
runtime/autoload/provider/pythonx.vim.
2018-04-30 16:54:35 +02:00
Daniel Hahler
7d8327fd30 health#provider: improve error reporting
- quote command, so that e.g. markdown handling is not applied to `__init__.py`
- include cwd
2018-04-30 16:50:01 +02:00
Daniel Hahler
87d3f265bc health#provider: fix logic with s:shellify
It should be quoted if there is any character that needs escaping, but
not if there is a character that does not need escaping.
2018-04-30 16:48:32 +02:00
Daniel Hahler
1d5eec2c62 health/provider: python: warning with correct host prog (#8049)
I have `g:python3_host_prog` set to the system Python, where a package
is also installed to provide the "neovim" module.

`:checkhealth provider` however displays a warning for this:

> Your virtualenv is not set up optimally.

This is because /usr/bin/python is not in /home/user/.pyenv.

I think this warning should not get displayed if host_prog_var exists.

It goes back to the initial commit (20447ba09), and is maybe only
missing the `!` there as with the previous commit.

Full output:
```
  - INFO: pyenv: /home/user/.pyenv/libexec/pyenv
  - INFO: pyenv root: /home/user/.pyenv
  - INFO: Using: g:python3_host_prog = "/usr/bin/python"
  - WARNING: Your virtualenv is not set up optimally (/usr/bin/python is not in /home/user/.pyenv).
    - ADVICE:
      - Create a virtualenv specifically for Neovim and use `g:python3_host_prog`.  This will avoid the need to install Neovim's Python module in each virtualenv.
  - WARNING: $VIRTUAL_ENV exists but appears to be inactive. This could lead to unexpected results.
    - ADVICE:
      - If you are using Zsh, see: http://vi.stackexchange.com/a/7654
  - INFO: Executable: /usr/bin/python
  - INFO: Python3 version: 3.6.4
  - INFO: python-neovim version: 0.2.1
  - OK: Latest python-neovim is installed: 0.2.1
```
2018-03-04 20:04:52 +01:00
Daniel Hahler
830b5819a0 health/provider: check Python also with loaded_var (#8047)
`g:loaded_python3_provider` gets set when the autoload file is sourced,
but this might error out, e.g. with deoplete:

    [deoplete] Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
    [deoplete] function remote#define#FunctionBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll, line 14
    [deoplete] deoplete requires Python3 support("+python3").
    [deoplete] deoplete failed to load. Try the :UpdateRemotePlugins command and restart Neovim.  See also :checkhealth.

It refers to `:checkhealth` from there explicitly, which would then
(without this patch) say that Python 3 is disabled.

This patch changes the reported info to include that it might have been
disabled due to some error, and keeps on going.
2018-02-22 02:38:00 +01:00
Daniel Hahler
1eb4aff57a checkhealth: python: do not report pythonx_errs twice (#8045)
They get reported unconditionally as errors below.
2018-02-22 02:37:23 +01:00
Daniel Hahler
c8074e3792 runtime/autoload/health/*.vim: fix vint warning (#8048) 2018-02-22 02:30:39 +01:00
Marco Hinz
dc53629587 macOS: Use pbpaste to detect a working clipboard (#7983)
`pbcopy` writes to the clipboard, it should not be used to sanity-check the clipboard.
2018-02-08 00:27:54 +01:00
Justin M. Keyes
6452831cf9 clipboard: macOS: fallback to tmux if pbcopy is broken #7940
On some versions of macOS, pbcopy doesn't work in tmux <2.6
https://superuser.com/q/231130
Fallback to tmux in that case.

Add a healthcheck for this scenario.
2018-01-31 11:37:05 +01:00
Justin M. Keyes
5563e808da health.vim: fix $VIRTUAL_ENV validation
Check that the full path to the python interpreter starts with
$VIRTUAL_ENV.

closes #7770
2017-12-29 18:45:21 +01:00
Justin M. Keyes
2f3e001717 health.vim: minor refactor (group related logic) 2017-12-27 13:53:01 +01:00
Justin M. Keyes
fe60fa9faa doc
vim-patch:8.0.1206: no autocmd for entering or leaving the command line
(commit a4f6cec7a3)

NA patches:
vim-patch:8.0.0320: warning for unused variable with small build
2017-12-26 03:58:28 +01:00
Alex Genco
2851bb9eff health.vim: mention g:ruby_host_prog #7737 2017-12-17 18:04:47 +01:00
quinoa42
f3d7eeff77 health.vim: Try pyenv root #7341 2017-12-17 17:45:59 +01:00
Justin M. Keyes
e0054fef7d health.vim: nodejs: skip if nodejs is too old 2017-12-17 16:09:18 +01:00
Jan Edmund Lazo
a1adfdc7d5 ci: nodejs client acceptance-test #7706
ci: install nodejs 8 in Appveyor, Travis

provider: check node version for debug support
Resolve https://github.com/neovim/neovim/pull/7577#issuecomment-350590592 for Unix.

provider: test if nodejs in ci supports --inspect-brk

nodejs host for neovim requires nodejs 6+ to work properly.
nodejs 6.12+ or 7.6+ is required for debug support via `node --inspect-brk`.

provider: run cli.js of nodejs host directly

npm shims are useless because the user cannot set node to debug mode via
--inspect-brk. This is problematic on Windows which use batchfiles and
shell scripts to compensate for not supporting shebang.

The patch uses `npm root -g` to get the absolute path of the global npm
modules. If that fails, then the user did not install neovim npm package
globally. Use that absolute path to find `neovim/bin/cli.js`, which is
what the npm shim actually runs with node. glob() is for a simple file
check in case bin/ is removed because the npm shims are ignored now.
2017-12-17 16:09:18 +01:00
Billy Vong
eacd788cf5 :checkhealth: fix check for npm and yarn (#7569)
Fix bug that checked for npm AND yarn, where we wanted npm OR yarn.
But since we call `npm` exclusively, and it's highly unlikely you have
yarn installed without npm, let's just remove the yarn check altogether.

Addresses https://github.com/neovim/node-client/issues/41
2017-11-16 23:43:50 +01:00
Jan Edmund Lazo
a43a573ad5 health.vim: normalize slashes for script path (#7525)
:checkhealth reports that remote plugins are unregistered
after running :UpdateRemotePlugins because of the backslashes in filepath.
Normalize them to forward slashes because the paths in rplugin.vim are normalized in autoload/remote/host.vim.
2017-11-13 02:10:06 +01:00
Justin M. Keyes
b6a603fe51
Merge #7458 'remote: add node host' 2017-11-11 01:54:32 +01:00
Justin M. Keyes
b7f1885fab health.vim: env var may be defined but empty #7498 2017-11-07 02:15:34 +01:00
Justin M. Keyes
7bcbf5d456
health.vim: show TUI-related env vars (#7498)
ref #7473
ref #7490
2017-11-07 00:53:26 +01:00
Billy Vong
8b199cb2fe health: add node health check 2017-10-29 11:06:47 -07:00
Justin M. Keyes
3bcee71cc8 :checkhealth : validate $VIM 2017-10-17 01:51:21 +02:00
Justin M. Keyes
7ca1f43f68 health.vim: warn about 'paste' option 2017-10-15 12:06:13 +02:00
Greg Anders
7c00b10d8d health.vim: always check pyenv if installed #7219
Always check for the presence of pyenv_root if pyenv is installed: if it
is not set, we don't know if it was intentional. If it wasn't
intentional, the warning is confusing (see #7176).

closes #7176
2017-09-09 15:56:51 +02:00
Justin M. Keyes
9882e25dc4 clipboard: avoid error flood during :redir
redir_write():
- This is a "batch" operation which was not yet covered by
  start_batch_changes()

adjust_clipboard_name():
- msg() and friends during :redir will, of course, cause redir_write()
  to try to capture that message, which causes recursion.
- EMSG() here is trouble: if it interrupts :redir it is a mess.
  Rather than deal with the mess, show a non-error message.

closes #7182
closes #7184
closes #7183
ref #6048
ref #7032
2017-08-20 19:49:42 +02:00
Justin M. Keyes
72c38b5cd5 health.vim: validate g:clipboard
Closes #7020

Also fix 'iskeyword' setting, which I fumbled in
440133e0d5
2017-07-15 15:19:01 +02:00
Alex Genco
826210a465 runtime: Fix issue with Ruby health latest_gem determination
Sometimes the `gem list` command used for finding the latest version of
the `neovim` gem prints an error, which can throw off the `split()` call
due to extra parenthesis. This locks down the split pattern to make
conflicts less likely.
2017-06-17 08:20:00 -07:00