Commit Graph

592 Commits

Author SHA1 Message Date
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
edeb19d5e9
python#CheckForModule: Use the given module string instead of hard-coding pynvim 2019-01-01 16:06:37 -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
Justin M. Keyes
e509576e53
provider/lang: expand() g:foo_host_prog (#9312)
Before this commit, if user does this:
    let g:node_host_prog = '~/.nvm/versions/node/v11.3.0/bin/neovim-node-host'
the "~/" is not expanded to user's home directory.

`:help g:ruby_host_prog` suggests a path with "~/" so technically we
already claimed to support this.

closes https://github.com/neovim/node-client/issues/102
2018-12-05 00:11:28 +01:00
@equalsraf
d207440f1e clipboard: Revert unused check #9309
PR #9304 added support for functions in clipboard providers. As part of
the PR I meant to move two checks in the provider code out of an if
statement into separate statements and adding additional checks for
g:clipboard attributes - as it turns out the code is wrong and it does
not implement additional checks while it adds two conditions that make
very little sense

    type(g:clipboard['copy']) #isnot# v:t_func

what would make sense would be something along the lines of

    type(g:clipboard['copy']['+']) #isnot# v:t_func

but might not be what we want either, so I'm reverting this.
2018-12-04 21:38:20 +01:00
Rui Abreu Ferreira
07ad5d71ab clipboard: Support custom VimL functions #9304
Up to now g:clipboard["copy"] only supported string values invoked as
system commands.

This commit enables the use of VimL functions instead. The function
signatures are the same as in provider/clipboard.vim. A clipboard
provider is expected to store and return a list of lines (i.e. the text)
and a register type (as seen in setreg()).

cache_enabled is ignored if "copy" is provided by a VimL function.
2018-12-03 00:07:08 +01:00
Justin M. Keyes
799d9c3215
clipboard: Prefer xclip (#9302)
The order was swapped in #4150 to prefer `xsel` but there wasn't a clear
explanation.  Meanwhile, `xsel` has been neglected upstream.

Let's trying preferring `xclip` again, we've had a few reports of
problems with `xsel`.

closes #7237
ref #5853
ref #7449
2018-12-01 18:50:26 +01:00
Bjorn Neergaard
108566e7b6 clipboard.vim: check for win32yank.exe #9263
Win32 allows omitting the `.exe` extension, but WSL does not.
2018-11-21 12:24:40 +01: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
443cd04d5b
provider/python: refactoring 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
Jan Edmund Lazo
f6c6567cb1 vim-patch:8.1.0352: browsing compressed tar files does not always work
Problem:    Browsing compressed tar files does not always work.
Solution:   Use the "file" command to get the compression type.
d4a1aabe37
2018-11-13 22:33:27 -05:00
ainola
05f9c7c2f7 clipboard: support Wayland (#9230)
Fixes #9213
2018-11-13 19:01:37 +01:00
Justin M. Keyes
b24209dcf5 provider/nodejs: handle missing stdout
ref https://github.com/neovim/neovim/issues/9001#issuecomment-434802234
2018-10-31 20:42:41 +01:00
Justin M. Keyes
18ce6c9063 vim-patch:2c64ca1802b2
Update runtime files
2c64ca1802
2018-10-30 00:05:25 +01:00
Justin M. Keyes
11bcd48fda vim-patch:20aac6c11269
Update runtime files.
20aac6c112
2018-10-29 23:55:45 +01:00
Justin M. Keyes
2c7ed420d9 vim-patch:fc65cabb15d0
Update runtime files.
fc65cabb15

---

vim-patch:8.0.1279: initializing menus can be slow
Problem:    Initializing menus can be slow, especially when there are many
            keymaps, color schemes, etc.
Solution:   Do the globbing for runtime files lazlily. (Ken Takata)
2018-10-29 23:54:15 +01:00
Justin M. Keyes
07fdbba9d0 vim-patch:91f84f6e11cd
Update runtime files.
91f84f6e11
2018-10-29 09:55:07 +01:00
Justin M. Keyes
877d5c8be7 vim-patch:a9604e614517
Update runtime files.
a9604e6145
2018-10-29 09:50:08 +01:00
Justin M. Keyes
5a022c71e4 vim-patch:6dc819b1299e
Updated runtime and language files.
6dc819b129
2018-10-29 09:39:48 +01:00
Justin M. Keyes
9da951ad47 vim-patch:0b0f0992d46e
Update runtime files.
0b0f0992d4
2018-10-29 09:29:17 +01:00
Justin M. Keyes
bee8a0ae8c vim-patch:7db25fed5de1
Update runtime files.
7db25fed5d
2018-10-29 09:21:00 +01:00
Justin M. Keyes
dae1213e57 vim-patch:f0b03c4e98f8
Update runtime files
f0b03c4e98

Note: haskell changes were included in 942f3587c3
2018-10-28 13:57:08 +01:00
Justin M. Keyes
112a5b76e6 man.vim: lowercase title when invoked as $MANPAGER
man#init_pager() guesses the ref by the heading, which is usually
uppercase, so we don't know the correct casing. But lowercase is more
common, so use that for the buffer name instead of uppercase.

ref #9156
2018-10-26 02:50:21 +02:00
Justin M. Keyes
c03a0f5fc8 man.vim: avoid duplicate buffers, E95
Before this commit, man#init_pager() always tries to scrape the manpage
name and set the buffer name. That's much less important than avoiding
duplicate buffers and E95. And it doesn't seem to be necessary, usually.

Steps to reproduce:

    $ export MANPAGER="nvim -c 'set ft=man' -"
    $ man sleep
    :Man sleep

    Error detected while processing function man#init_pager:
    line   15:
    E95: Buffer with this name already exists

    :ls!
    1  h-  "man://SLEEP(1)"               line 4
    2 %a-  "man://sleep(1)"               line 1
2018-10-25 04:09:53 +02:00
Jan Edmund Lazo
b23759b4d7 provider/nodejs: fix npm,yarn detection
For each package manager,
1. Check if they are executable before starting a job.
2. Check if the job opts are set before checking the job status
   TODO: Validate the job id.

Prioritize npm because it's faster than yarn.
Reindent the code to 2-space indent.
2018-10-22 01:30:28 +02:00
Mahmoud Al-Qudsi
1cf50cbfd9 provider/nodejs: Simultaneously query npm and yarn #9054
ref #9001

Instead of serially querying npm and yarn for neovim, start both as a
job and then wait for a successful result from either.
2018-10-18 20:32:44 +02:00
Justin M. Keyes
3999aa755e man.vim: set $MANWIDTH=999
On some systems, mandoc disallows $MANWIDTH greater than 1000.
E.g. FreeBSD:
b7d613ae8a/contrib/mandoc/manpath.c (L312)

closes #9065
2018-09-30 18:35:19 +02:00
Justin M. Keyes
a1976c7390 man.vim: Start at the top #9023
fixes #9057
2018-09-27 10:08:31 +02:00
Justin M. Keyes
dc256e376d man.vim: Fix very long justified lines #9023
When nroff justifies a line, it fills the line with whitespace to meet
$MANWIDTH.  With $MANWIDTH=9999, that of course results in nonsense (and
behaves poorly with 'cursorline' option).

To work around that, instead of trying to hard-justify the lines, just
replace the mega-whitespace with a fixed size of 10 spaces.

Perhaps N/Vim needs a "soft justify" feature?
2018-09-21 10:17:37 +02:00
Doron Behar
9081cad514 man.vim: Ignore $MANWIDTH, use soft wrap #9023
fix #9017
close #9023
2018-09-21 10:17:37 +02:00
ZyX
b728aad212 runtime/msgpack: Fix inf/nan regexp
Not making minus sign optional as inf/nan without optional minus should’ve
already been handled by the very first case.
2018-09-06 02:12:36 +03:00
dm1try
71bb4fd481 man.vim: guard against reload (#8940)
Some plugins attempt to reload autoloaded scripts.
Use a guard to prevent this.

fix #8939
2018-09-01 11:42:43 +02:00
Justin M. Keyes
a8b4d76a0a health.vim: Detect missing init.vim
closes #4877
2018-08-27 01:35:58 +02:00
Justin M. Keyes
c0157e8fe0
remote/host.vim: specify {nosuf} for globpath() (#8882) 2018-08-24 10:17:59 +02:00
Felipe Morales
a5e3f4da34 tutor: don't set statusline (#8844)
also, remove unused function tutor#InfoText()

fixes #8842
2018-08-10 19:01:17 +02:00
Marco Hinz
d581398779 ruby: detect rbenv shims for other versions (#8733)
When rbenv is used for managing Ruby installations, just checking for an
executable called "neovim-ruby-host" is not enough. It has to be run as well.

If it does not return 0, then neovim-ruby-host is merely a shim for another Ruby
installation.

  $ rbenv versions
    2.5.0
  * 2.5.1 (set by /Users/mhi/.rbenv/version)

  $ rbenv whence neovim-ruby-host
  2.5.0

  $ which neovim-ruby-host
  /Users/mhi/.rbenv/shims/neovim-ruby-host

  $ neovim-ruby-host
  rbenv: neovim-ruby-host: command not found

  The `neovim-ruby-host' command exists in these Ruby versions:
    2.5.0

  $ echo $?
  127

Additionally, the detection logic was moved from provider#ruby#Detect() to
s:detect(), because the former is run in the sandbox which forbids calling
system().
2018-08-09 00:47:35 +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
Brayden Banks
9afed40ea6 man.vim: fix for mandoc (#8698)
When giving a section, the first candidate selection was not performed.

followup/fixup #8341
2018-07-08 17:31:10 +02:00
Takuya Matsuyama
e889640048 provider/node: npm --loglevel silent (#8682)
closes #8674
npm log level may cause unexpected output.
2018-07-04 12:13:36 +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
Justin M. Keyes
8d40b3617c
Merge #8371 'API: more reliable/descriptive VimL errors' 2018-05-10 19:18:58 +02:00
Justin M. Keyes
1cd8517344 man.vim: s:get_path(): trim newline in all cases
ref #8372
2018-05-10 16:03:13 +02:00
Justin M. Keyes
966e7abc49 msgpack.vim: require python3 on Windows
timestamp.strftime('%s') workaround only works on unix.

ref: https://github.com/neovim/neovim/pull/8371#discussion_r186311766
2018-05-10 15:56:13 +02:00
Jon Bernard
f1a3075553 man.vim: get() first item if -w returns multiple paths #8372
OpenBSD's man returns all candidates when searching with -w instead of
the first one it finds.  So this patch takes the first one if multiple
entries are found.

closes #8372
closes #8341
2018-05-10 14:42:10 +02:00
Justin M. Keyes
33bfea31b0 msgpack.vim: fix syntax errors, python2 errors 2018-05-09 23:18:38 +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
Justin M. Keyes
b982f0e654 vim-patch:8.0.1285
d09a206ee9

vim-patch:8.0.0564: cannot detect Bazel BUILD files on some systems
2018-04-02 23:59:49 +02:00
Justin M. Keyes
411d578137 vim-patch:8.0.1282
Problem:    script-local variable defined in the wrong script
Solution:   Move variable to autoload/filetype.vim.

cef7322d8a
2018-04-02 23:59:48 +02:00
Justin M. Keyes
04f5062978 vim-patch:8.0.1281
Problem:    Loading file type detection slows down startup.
Solution:   Move functions to an autoload script.
851ee6c3da

---

vim-patch:8.0.0635
Problem:    When 'ignorecase' is set script detection is inaccurate.
Solution:   Enforce matching case for text. (closes #1753)
2018-04-02 23:59:46 +02:00
chemzqm
338664e96c node/provider: support g:node_host_prog #8135 2018-03-15 04:55:48 +01: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
4696a5a10e health.vim: minor cleanup (#8046) 2018-02-22 02:42:08 +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
James McCoy
3af3515e74 Add provider#Poll() to handle starting and polling the provider 2018-02-16 14:08:12 -05:00
James McCoy
6fbb8d6739 provider: Safely access job.stderr in #Require
If `jobstart()` fails, then the subsequent `rpcrequest()` will throw due
to an invalid channel id.  This causes `job.stderr` not to exist, so we
throw another exception when trying to dump the job's stderr.

    Error detected while processing function remote#define#AutocmdBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require:
    line 22:
    E716: Key not present in Dictionary: stderr

This obfuscates the actual problem.
2018-02-16 13:33:23 -05:00
James McCoy
48dc1f3f90 provider: ruby: Use stderr_buffered to collect stderr 2018-02-16 13:33:07 -05: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
Marco Hinz
dbcdd29139
man.vim: use correct offset in presence of modifier commands
The argument expansion for :Man depends on the number of arguments given to it
starting at the command itself. But user completion functions always provide the
entire command-line which can include modifier commands like :tab, :vert, etc.
leading to a wrong number of arguments.

Prune all arguments up to :Man.

Fixes #7872.
2018-01-22 17:05:52 +01:00
Felipe Morales
7dd3910f47 tutor: don't resize (#7854) 2018-01-15 21:59:37 +01:00
Justin M. Keyes
59888b68ab Merge #7623 'man.vim: highlight bold, underlined text' 2018-01-09 10:10:22 +01:00
Anmol Sethi
3eaa9a2579 man.vim: always keep the alternate buffer (#7784)
Closes #7772
2017-12-29 19:00:10 +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
Gabriel Holodak
eb44519b5d Address PR comments 2017-12-27 23:28:04 -05:00
Gabriel Holodak
6740c94562 Add support for escape sequences 2017-12-27 23:27:14 -05:00
Gabriel Holodak
c28ce5f619 Switch to processing in Lua 2017-12-27 23:27:14 -05:00
Gabriel Holodak
0446d4d691 Highlight backspaced characters 2017-12-27 23:27:14 -05:00
Justin M. Keyes
2f3e001717 health.vim: minor refactor (group related logic) 2017-12-27 13:53:01 +01:00
Justin M. Keyes
341102fe9f health.vim: remove :CheckHealth command
For back-compat, :CheckHealth runs :checkhealth. But don't define
:CheckHealth explicitly, it adds noise to wildmenu completion.

Completion of healthchecks doesn't yet work with :checkhealth, this is
a regression but it needs to be implemented for :checkhealth rather than
keeping :CheckHealth around.
2017-12-27 13:00:58 +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
Björn Linse
61ba3c5e31 provider: delete vimL stderr collector, now that it exists builtin 2017-12-23 14:32:25 +01:00
Justin M. Keyes
cca6d4b267
provider/nodejs: more robust version-check (#7738) 2017-12-18 01:48:30 +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
103ff26c0a provider/nodejs: check version in Detect() 2017-12-17 16:09:18 +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
Jan Edmund Lazo
2d732a11b1 provider: fix batchfile extension for ruby gem (#7651)
ruby uses batchfiles with 'cmd' extension.
gem creates batchfiles with 'bat' extension.
`gem install rails` does the following in Windows (not Cygwin):

1. Run `gem.cmd install rails` on cmd.exe
2. gem.cmd runs `ruby.exe -x gem install rails`
3. `rails` gem is installed.
   `rails.bat` is created in the same directory
   where ruby.exe and gem.cmd reside.
2017-11-29 03:19:33 +01:00
Björn Linse
df019cebd5 Revert "provider: delete vimL stderr collector, now that it exists builtin"
This change exposed a memory issue with buffered channels, possibly
involving GC. Revert until it has been fixed.

This reverts commit 0de019b6a6.
2017-11-27 11:07:49 +01:00
Björn Linse
0de019b6a6 provider: delete vimL stderr collector, now that it exists builtin 2017-11-26 09:17:06 +01:00
Jan Edmund Lazo
e8af34dc63 win: provider: Detect(): return *.cmd path (#7577)
neovim-ruby-host is a ruby script.
neovim-node-host is a shell script.
Both don't work in cmd.exe so gem and npm provide batchfile shims.

Return the full path of these shims, cmd.exe knows better what to do with these files.
2017-11-17 23:52:51 +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
zandrmartin
f8d40e7d53 health.vim: define highlights as default (#7560) 2017-11-14 22:08:50 +01:00
Justin M. Keyes
c5f001a46a
runtime: revert netrw update (#7557)
fixes #7527
fixes #7536
2017-11-14 20:56:00 +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
2ca59638ba vim-patch:b0d45e7f5354
Update runtime files.

b0d45e7f53
2017-11-07 23:07:03 +01:00
Justin M. Keyes
4175dfac9a vim-patch:01164a6546b4
Long overdue runtime update.

01164a6546
2017-11-07 23:07:03 +01:00
Justin M. Keyes
8c6168565c vim-patch:37c64c78fd87
Note: Ignored changes to matchit.vim in favor of faca814116.

---

Update runtime files.

37c64c78fd
2017-11-07 20:03:24 +01:00
James McCoy
b9b2fb7d5d
spellfile.vim: Search for a writable directory on Windows
Fixes #6664 until #6272 is merged and sdtpath('data') can be used.
2017-11-06 20:54:07 -05: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
0312fc2ddb vim-patch:3c2881dc1195
Update runtime files.  Add Rust support.

3c2881dc11
2017-11-07 01:04:17 +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
Justin M. Keyes
93fb7383a3 vim-patch:214641f77df6
Runtime file updates.

214641f77d

N/A:
vim-patch:26a280c47a1c
2017-11-06 05:26:16 +01:00
Justin M. Keyes
8cb77acb44 spellfile.vim: use :keeppatterns before :global 2017-11-06 01:56:04 +01:00
Billy Vong
eed10f7e23 use provider#stderr_collector 2017-10-31 08:35:29 -07:00
Billy Vong
7890157931 remote: add node.js as a remote plugin provider 2017-10-29 11:10:33 -07:00
Billy Vong
8b199cb2fe health: add node health check 2017-10-29 11:06:47 -07:00
Björn Linse
2a3bcd1ff8 rpc: Don't delay notifications when request is pending (#6544)
With the old behavior, if a GUI makes a blocking request that requires user
interaction (like nvim_input()), it would not get any screen updates.

The client, not nvim, should decide how to handle notifications during a
pending request. If an rplugin wants to avoid async calls while a sync call is
busy, it likely wants to avoid processing async calls while another async call
also is handled as well.

This may break the expectation of some existing rplugins. For compatibility,
remote/define.vim reimplements the old behavior. Clients can opt-out by
specifying `sync=urgent`.

- Legacy hosts should be updated to use `sync=urgent`. They could add a flag
  indicating which async methods are always safe to call and which must wait
  until the main loop returns.
- New hosts can expose the full asyncness, they don't need to offer both
  behaviors.

ref #6532
ref #1398 d83868fe90
2017-10-29 03:06:53 +01:00
Justin M. Keyes
3bcee71cc8 :checkhealth : validate $VIM 2017-10-17 01:51:21 +02:00
Justin M. Keyes
014bd59957 ex_checkhealth: call health#check() directly
This allows us to remove :CheckHealth later (avoids wildmenu noise).
2017-10-17 01:51:21 +02:00
Justin M. Keyes
d214df4e9b doc: replace ":CheckHealth" with ":checkhealth" 2017-10-17 01:51:21 +02:00
Justin M. Keyes
2a5a6a0541 health.vim: rename "suggestions" to "advice" in most places 2017-10-15 12:06:14 +02:00
Justin M. Keyes
c4ab110e04 health.vim: fix highlighting
`:syntax keyword` is affected by 'iskeyword'. When we aligned
'iskeyword' to that of filetype=help, colon (:) is now included.
Simplest way to deal with this is to include colon (:) in the `:syntax
keyword` directive.

Also:
- change "SUGGESTIONS" mouthful to "ADVICE"
- change "SUCCESS" to "OK"
2017-10-15 12:06:13 +02:00
Justin M. Keyes
7ca1f43f68 health.vim: warn about 'paste' option 2017-10-15 12:06:13 +02:00
Andy Russell
460aab3950 escape amatch filename (#7292)
Fixes #7046
Fixes autozimu/LanguageClient-neovim#77
2017-09-19 08:13:44 +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
James McCoy
ffdddcd93d
provider: Remove dict attribute from stderr_collector
If an autoloaded function hasn't been resolved before it is used in
function(), the self dict will not be created which causes E725 when
calling the function.  Since self isn't being used in
provider#stderr_collector, we can remove the dict attribute to
workaround the self dict bug[0].

Closes #7115

[0]: https://groups.google.com/d/msg/vim_dev/I7AXOyv-P4o/DzbyOxDHBgAJ
2017-08-26 13:49:39 -04:00
Justin M. Keyes
85f3084e21 clipboard: disallow recursion; show hint only once (#7203)
- Show hint only once per session.
- provider#clipboard#Call(): prevent recursion
- provider#clear_stderr(): use has_key(), because :silent! is still
  captured by :redir.

closes #7184
2017-08-22 20:31:54 +02:00
Justin M. Keyes
88165a798e clipboard: test g:clipboard validation, fix a bug
Also fix `:help foo` highlighting in health.vim
2017-08-20 22:17:03 +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
James McCoy
3acbb490de provider#clear_stderr: Use remove() not delete() to update s:stderr
Ref #7184
2017-08-18 12:32:49 -04:00
James McCoy
722806a115
provider: clipboard: Only report stderr if the job failed
Closes #7054
2017-07-24 20:10:40 -04:00
James McCoy
58d8d91ec1
provider: Extra pythonx's stderr handling to common functions 2017-07-24 20:10:28 -04:00
Andy Russell
26124b4800 provider/clipboard.vim: fix logic issue #7042
Closes #7039
2017-07-17 17:20:37 +02:00
Justin M. Keyes
a76da96e86 Merge #7028 from fmoralesc/vimtutor-disentangle2
Closes #4533
Closes #6389
Closes #4913 
Closes #7005
2017-07-16 18:19:41 +02:00
Felipe Morales
3241bce611 tutor: reorganize 2017-07-16 12:10:49 -04:00
Andy Russell
4dee942e73 provider/clipboard.vim: capture/display errors (#6684)
TODO: handle errors in the `get`. systemlist() should take an
options dictionary like jobstart(), which may specify a stderr handler.

References #6565
2017-07-15 20:51:51 +02:00
Felipe Morales
37af859930 tutor: update syntax
sampletext regions no longer supported

make sure tutorExpect is available

don't conceal code region delimiters
2017-07-15 11:01:45 -04:00
Felipe Morales
8e48d7c19e tutor: disable old method for setting "expect" regions
tutor: remove movement mappings
2017-07-15 11:01:45 -04:00
Felipe Morales
ec67d07065 tutor: allow metadata to exist outside of the documents.
this makes 'expect' regions simpler to handle.
2017-07-15 11:01:45 -04: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
Justin M. Keyes
f0dafa89c2 provider/clipboard.vim: Handle missing g:clipboard keys 2017-06-28 09:42:03 +02:00
Justin M. Keyes
6016ac270f provider/clipboard.vim: allow configuration #6030
Closes #6029
2017-06-27 12:22:06 +02:00
Alex Genco
f400c6f05f runtime: Allow overriding ruby host with g:ruby_host_prog
This allows users who have per-project Ruby versions (e.g. with `rvm`)
to pin to a particular gem installation.

For example: `let g:ruby_host_prog = 'rvm system do neovim-ruby-host'`
2017-06-17 08:20:00 -07: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
Xu Cheng
6efe84af68 provider/clipboard: add tmux support (#6894) 2017-06-15 09:15:56 +02:00
Justin M. Keyes
133f8bc628 Merge #4700 from AdnoC/keep-default-register 2017-05-31 23:43:40 +02:00
AdnoC
a00b03d03f shada: Set the unnamed register to the previous unnamed register on startup 2017-05-31 13:18:59 -04:00
raichoo
967e892cb6 man.vim: feature-test section (-s) flag #6815
Different implementations of `man` might be using different
flags for sections.
2017-05-26 00:30:40 +02:00
raichoo
3280765f2d man.vim: check for -l flag #6766 2017-05-19 14:02:11 +02:00
Justin M. Keyes
3eaf4a0d5b health.vim: Don't lose contents after hide. 2017-05-11 14:20:57 +02:00
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
Matthew Wynn
e7a4d95a9e man.vim: Fix filename argument in mandoc #6693
Use the -l flag to open a man file.
TODO: Does not work on SunOS.

Fixes #6683
2017-05-08 17:45:06 +02:00
Marco Hinz
2b3cb2c448
Make script_host.rb rubocop-clean
Fix the following issues according to rubocop:

    runtime/autoload/provider/script_host.rb:2:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
      require "neovim/ruby_provider"
              ^^^^^^^^^^^^^^^^^^^^^^
    runtime/autoload/provider/script_host.rb:5:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
        "Your neovim RubyGem is missing or out of date. " +
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    runtime/autoload/provider/script_host.rb:5:55: C: Use \ instead of + or << to concatenate those strings.
        "Your neovim RubyGem is missing or out of date. " +
    runtime/autoload/provider/script_host.rb:6:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
        "Install the latest version using `gem install neovim`."
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This commit assumes Ruby 2.0.0+.
2017-05-03 22:24:51 +02:00
Tommy Allen
bc4a2e1576 help, man.vim: "outline" (TOC) feature #5169 2017-05-01 17:45:54 +02:00
Justin M. Keyes
deccd843ed vim-patch:3df0173fa6d0
Updated runtime files.

3df0173fa6
2017-05-01 13:32:51 +02:00
Justin M. Keyes
5a304b7864 Merge #6615 from justinmk/vim-patches 2017-04-29 14:59:10 +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
Justin M. Keyes
8d3f8f639b vim-patch:46fceaaa8d14
Updated runtime files.

46fceaaa8d
2017-04-29 01:47:36 +02:00
Justin M. Keyes
9f6d693e26 Merge #6613 from justinmk/vim-patches 2017-04-29 01:41:29 +02:00
Justin M. Keyes
5341967315 vim-patch:4575876dc865
Updated runtime files.

4575876dc8
2017-04-29 01:03:42 +02:00
Justin M. Keyes
60e68f3096 vim-patch:dc08328821a2
Updated runtime files.

dc08328821

NA patches:
vim-patch:8.0.0028
vim-patch:8.0.0029
vim-patch:8.0.0030
2017-04-29 01:01:51 +02:00
Justin M. Keyes
460d5971f6 vim-patch:2ec618c9feac
Updated runtime files.

2ec618c9fe
2017-04-28 23:49:16 +02:00
Justin M. Keyes
40fb96c76a vim-patch:3e496b0ea319
Updated runtime files.

3e496b0ea3

NA patches:
vim-patch:8.0.0015
vim-patch:8.0.0016
vim-patch:177778575148
2017-04-28 23:39:24 +02:00
Daniel Hahler
59be0b4280 health.vim: syntax/style fixes (#6614) 2017-04-28 23:18:10 +02:00
Justin M. Keyes
06879e2e89 vim-patch:d07969093a9b
Updated runtime files.

d07969093a
2017-04-28 22:51:30 +02:00
Justin M. Keyes
becde1745a vim-patch:8.0.0002
Problem:    The netrw plugin does not work.
Solution:   Make it accept version 8.0.

9e1e7afc1f

vim-patch:b56e7ff0dbbf

Update translations for intro page.

b56e7ff0db
2017-04-28 22:41:07 +02:00
Justin M. Keyes
a53409b564 vim-patch:89bcfda6834a
Updated runtime files.  Remove version checks for Vim older than 6.0.

89bcfda683
2017-04-28 21:13:55 +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
Anmol Sethi
a346cb1d58 man.vim: call s:error in man#read_page (#6362)
The comment is incorrect, s:error does need to be called. I thought the
call was unnecessary because it didn't show any message for me but I had
shortmess+=F which was hiding the message.
2017-03-25 22:43:25 +01:00
Tommy Allen
a62ec4eb98 health.vim: tmux: Try -qvg and -qvgs (#6348) 2017-03-24 01:38:01 +01:00
Justin M. Keyes
d1afd434f3 rplugin: Call s:LoadRemotePlugins() on startup.
Dispense with the FuncUndefined/CmdUndefined quasi-optimization.
If there are no rplugins, plugin/rplugin.vim takes less than 1ms.

Closes #5821
Closes #6250

Helped-by: Qiming zhao <chemzqm@gmail.com>
2017-03-11 12:26:22 +01:00
Justin M. Keyes
e5be3aaaef health.vim: tmux $TERM, default-terminal 2017-03-06 03:17:40 +01:00
Anmol Sethi
c8ee0be745 man.vim: use 'eventignore' instead of :noautocmd #6149
We only need to ignore BufReadCmd (from runtime/plugin/man.vim).

Closes #6144
2017-02-27 18:16:37 +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
c43ba671c3 health.vim: Reduce visual noise.
- SUCCESS should be extra green, regardless of colorscheme.
- Do not highlight INFO and SUGGESTIONS, they should not demand the
  user's attention.
2017-02-12 11:38:28 +01:00
Justin M. Keyes
611411bf85 CheckHealth: choose correct $PATH separator 2017-02-04 11:07:49 +01:00
Anmol Sethi
3d3b1641d0 man.vim: more robust s:verify_exists #6043
Closes #6039

Also: close the window if we could not get the page from man but only if
we opened it ourselves.
2017-02-04 10:02:59 +01:00
Anmol Sethi
39a6f835e7 man.vim: get page after opening split (#6032)
This will ensure that $MANWIDTH is correctly set.
2017-01-31 16:03:45 +01:00
Anmol Sethi
5bcb972a88 man.vim: remove terminal escape characters (#6033)
This will make man.vim work on nixOS.
2017-01-31 16:00:00 +01:00
Rui Abreu Ferreira
33cd06dfb7 Windows: Clipboard provider win32yank 2017-01-20 18:29:17 +00:00
Marco Hinz
15c85d8462 clipboard: only check for pbcopy on macOS (#5927)
Fixes #5926.
2017-01-11 00:50:07 +01:00
James McCoy
60e306368d
vim-patch:aa3b15d
Updated runtime files.

aa3b15dbeb
2017-01-09 20:23:41 -05: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
Marcus Fritzsch
afa7f42f77 man.vim: Avoid empty argument when MANWIDTH is set. (#5882) 2017-01-06 00:20:22 +01:00
Marco Hinz
1fbee630a8 provider: add Python 3.6 (#5886) 2017-01-05 21:29:31 +01:00
Justin M. Keyes
e21aef1e10 Merge #5874 from ZyX-I/fix-5482
Fix plugin which opens ShaDa files
2017-01-04 17:34:17 +01:00
Justin M. Keyes
695703ca97 provider/clipboard.vim: fallback if xsel is broken (#5868)
Old versions of `xsel` do not support some required features.
Fall back to `xclip` then.

Closes #5853
2017-01-04 15:10:31 +01:00
ZyX
24b3b938e8 plugin/shada: Handle NUL characters with intchar correctly
Fixes #5482
2017-01-04 15:06:33 +03:00
ZyX
d82f5d1ba2 plugin/msgpack: Support character constants like '\0' 2017-01-04 14:53:02 +03:00
Justin M. Keyes
6f9be2464c Merge #5872 justinmk/test_autochdir 2017-01-04 08:24:36 +01:00
Marco Hinz
15259c4b84 clipboard: show error message only once and put in history (#5870) 2017-01-04 00:45:31 +01:00
Shougo Matsushita
6ba3b85382 vim-patch:6f1d9a
Updated runtime files.

6f1d9a096b
2017-01-02 10:45:10 +09:00
Anmol Sethi
f6c4e0961d man.vim: remove newline from man errors (#5852) 2017-01-01 15:09:27 +01:00
Anmol Sethi
c72f4d4d05 man.vim: revert "completion now respects 'wildignorecase'" (#5839)
Instead, a note was added to `:h man.vim` on how 'fileignorecase'
controls the case sensitivity of completion.
2016-12-27 19:01:04 -05: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
Anmol Sethi
49983a2270 man.vim: properly handle manpage names with spaces 2016-12-27 16:18:03 -05:00
Anmol Sethi
e59147d1ba man.vim: completion now respects 'wildignorecase' 2016-12-27 16:17:58 -05:00
Anmol Sethi
7f9a95e5ea man.vim: when completing a fpage, always show section 2016-12-26 18:27:16 -05: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
5082af415f Health: rework syntax (#5744)
- By re-enabling code blocks (every line that doesn't begin with a "-" and is
  indented by at least 4 spaces), we prevent the Markdown syntax to evaluate "_"
  as beginning for italic text.

  That's the case for `:CheckHealth deoplete` for instance. It would output:

    $ cat /tmp/log_{PID}

  Since the deoplete check gets run first, almost all of the following
  `:CheckHealth` output would be italic.

- Since we re-enable code blocks, we now have to tell our custom syntax that it
  can be part of markdownCodeBlock as well. Otherwise there would be no
  highlithing for our keywords ERROR, INFO, etc. after 4 spaces of indent.

- Since we do the above anyway, we make it work for mkdListItemLine as well.
  That's a highlight group from `plasticboy/vim-markdown` opposed to the shipped
  markdown syntax (which essentially is `tpope/vim-markdown`). Before this patch
  there was no highlighting at all in the `:CheckHealth` output.
2016-12-09 19:54:24 +01:00
Marco Hinz
ae9f1938ea Health: match syntax keyword case exactly (#5741)
This prevents the string "error" within error messages to be highlighted as
healthError.
2016-12-09 16:47:29 +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
Anmol Sethi
7a4d069bcc
man.vim: do not assume ftplugin is sourced before syntax
Fixes #5574
2016-11-19 13:41:04 -05:00
Anmol Sethi
cf52b881d9
man.vim: no guarantee that the first line contains anything useful
Fixes #5628
2016-11-18 14:06:42 -05: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
Marco Hinz
bd33f1165b CheckHealth: ignore non-existing markdownCodeBlock group (#5570)
People using [1] would experience an error, because their markdown syntax
doesn't define the markdownCodeBlock group.

[1]: https://github.com/plasticboy/vim-markdown

Closes #5569
2016-11-08 19:01: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
3a802e3c16 provider/clipboard.vim: never show a warning on sourcing
Never throw an error when provider/clipboard.vim is sourced for the first time.
Save the error instead and expose it via `provider#clipboard#Error()`, mimicking
provider/python.vim.
2016-11-02 12:06:57 +01:00
Marco Hinz
797d72a997 health/provider.vim: add clipboard check 2016-11-02 12:06:54 +01:00
Marco Hinz
0a1b852cd1 provider/clipboard.vim: refactor 2016-11-02 12:04:43 +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
Marco Hinz
657ba62a84 rplugin: resolve paths in manifest file (#5501)
`:CheckHealth nvim` would always report an outdated manifest if symlinks were
used, because the manifest file contains unresolved paths that get compared
against resolved paths.

Now we resolve paths before they get written to the manifest file.
2016-10-18 23:16:13 +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
Shougo
1dde512498 UpdateRemotePlugins: Discard duplicate paths. (#5464) 2016-10-12 01:04:59 +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
d57f25e5ef doc/vim_diff.txt (#5432) 2016-10-06 09:45:24 +02:00
Anmol Sethi
4ceacb37d5 man.vim: prevent bell in ':wincmd w' when only one window (#5328) 2016-09-11 20:58:51 +02:00
Justin M. Keyes
df99c6493d health.vim: "No healthchecks found" also needs the buffer. 2016-09-05 19:42:28 -04:00
Justin M. Keyes
3c24704ac8 health.vim: Show results incrementally.
Also:

- improve precision of "No healthcheck found"
- fix SUGGESTIONS syntax group definition
- fix indentation of SUGGESTIONS
2016-09-05 19:22:01 -04: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
Anmol Sethi
9bba8ba372 [RFC] man.vim: remove <Plug> mappings (#5290)
- :Man with no arguments opens the manapage for the
  <cWORD> (man buffers) or <cword> (non-man buffers).
- remove now irrelevent comment about -P flag
2016-09-04 03:53:58 +02:00
Justin M. Keyes
c9e39f8227 man.vim: Avoid hard redraw.
Use system() instead of :read to avoid a hard redraw.
2016-09-03 13:59:37 -04:00
Anmol Sethi
f8fc8f51c0 man.vim #5249
- fix synopsis highlighting in other locales. Cannot always rely on the first
  line for the section in some locales; instead, use the file path and
  explicitly set b:man_sect to the actual section.
- eliminate separate s:man_args function
- simplify logic: do not reuse buffer content
- introduce b:man_default_sects Fixes #5233
- introduce <Plug>(man_vsplit), <Plug>(man_tab)
- simplify regexps
2016-09-03 12:57:41 -04:00
Justin M. Keyes
7bc627b3c8 Merge #5210 'vim-patch:7.4.1898 + :Man modifiers support'. 2016-08-25 21:54:00 -04:00
Anmol Sethi
db2aa27df1
man.vim: if reusing a buffer, do not use noautocmd
The commit that added support for modifiers regressed #5168
causing #5172. This commit fixes it again.
2016-08-24 15:41:51 -04:00
Anmol Sethi
470883d705
man.vim: slight refactoring
Addresses problem one in #5240
2016-08-24 11:51:59 -04:00
Anmol Sethi
10b014ca7b
man.vim: set window local options when reusing buffer
This is necessary incase the buffer was previously opened in a different
tab, in which the window options there do not carry over. It is not
explicitly documented in ':help local-options' but that is how it works.
2016-08-24 11:51:59 -04:00
Anmol Sethi
728d582333
man.vim: support for command modifiers
Closes #5235
2016-08-24 11:51:59 -04:00
Justin M. Keyes
297677ecf4 remote/host.vim: Avoid "No matching autocommands".
:silent does not silence this message, even :redir does not consume it.
But execute() _does_ consume it, which interferes with the current
implementation of health.vim. It's prudent to avoid it in any case, even
if the implementation of health.vim changes in the future.
2016-08-21 22:03:28 -04:00
Justin M. Keyes
45cc14d9a5 CheckHealth: Remove "disable"/"enable" concept
We can add this later if it is proven necessary, but it should not be
because:

1. User can run a subset of checkers via `:CheckHealth plugin1, ...,`
2. Healthcheck is a very rare operation. Optimizing it is not worth the
   code/API complexity.
2016-08-21 22:03:28 -04:00