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.
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.
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.
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
: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.
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 #1398d83868fe90
`: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"
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
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
- 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
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#7182closes#7184closes#7183
ref #6048
ref #7032
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'`
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.
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+.
Problem: The netrw plugin does not work.
Solution: Make it accept version 8.0.
9e1e7afc1f
vim-patch:b56e7ff0dbbf
Update translations for intro page.
b56e7ff0db
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.
Dispense with the FuncUndefined/CmdUndefined quasi-optimization.
If there are no rplugins, plugin/rplugin.vim takes less than 1ms.
Closes#5821Closes#6250
Helped-by: Qiming zhao <chemzqm@gmail.com>
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
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
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
- 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.
* 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.
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().
- 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.
- 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.
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!
* 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
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()
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.
`: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.
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.