aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchemzqm <chemzqm@gmail.com>2018-03-14 16:32:19 +0800
committerJustin M. Keyes <justinkz@gmail.com>2018-03-15 04:55:48 +0100
commit338664e96c9b0fd00cfe2c1312fa40219301379d (patch)
tree7052228ec423a2d9dc84f6c290969f92290d7d19
parent5ce8158a5d462043306ee67a3261794f169bdb17 (diff)
downloadrneovim-338664e96c9b0fd00cfe2c1312fa40219301379d.tar.gz
rneovim-338664e96c9b0fd00cfe2c1312fa40219301379d.tar.bz2
rneovim-338664e96c9b0fd00cfe2c1312fa40219301379d.zip
node/provider: support g:node_host_prog #8135
-rw-r--r--runtime/autoload/provider/node.vim3
-rw-r--r--runtime/doc/provider.txt34
2 files changed, 31 insertions, 6 deletions
diff --git a/runtime/autoload/provider/node.vim b/runtime/autoload/provider/node.vim
index ae6f84de72..39b5dc63b8 100644
--- a/runtime/autoload/provider/node.vim
+++ b/runtime/autoload/provider/node.vim
@@ -38,6 +38,9 @@ function! provider#node#can_inspect() abort
endfunction
function! provider#node#Detect() abort
+ if exists('g:node_host_prog')
+ return g:node_host_prog
+ endif
let global_modules = get(split(system('npm root -g'), "\n"), 0, '')
if v:shell_error || !isdirectory(global_modules)
return ''
diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt
index b806b08f95..d44cc2558e 100644
--- a/runtime/doc/provider.txt
+++ b/runtime/doc/provider.txt
@@ -33,20 +33,20 @@ To use Vim Python 2/3 plugins with Nvim:
- For Python 2 plugins, make sure an interpreter for Python 2.6 or 2.7 is
available in your `$PATH`, then install the `neovim` Python package systemwide: >
- $ sudo pip2 install --upgrade neovim
+ sudo pip2 install --upgrade neovim
<
or for the current user: >
- $ pip2 install --user --upgrade neovim
+ pip2 install --user --upgrade neovim
<
- For Python 3 plugins, make sure an interpreter for Python 3.3 or above is
available in your `$PATH`, then install the `neovim` Python package systemwide: >
- $ sudo pip3 install --upgrade neovim
+ sudo pip3 install --upgrade neovim
<
or for the current user: >
- $ pip3 install --user --upgrade neovim
+ pip3 install --user --upgrade neovim
<
Note: The `--upgrade` flag ensures you have the latest version even if
- a previous version was already installed.
+a previous version was already installed.
PYTHON PROVIDER CONFIGURATION ~
*g:python_host_prog*
@@ -93,7 +93,7 @@ Run |:checkhealth| to see if your system is up-to-date.
RUBY QUICKSTART ~
To use Vim Ruby plugins with Nvim, just install the latest `neovim` RubyGem: >
- $ gem install neovim
+ gem install neovim
RUBY PROVIDER CONFIGURATION ~
*g:loaded_ruby_provider*
@@ -112,6 +112,28 @@ To use an absolute path (e.g. to an rbenv installation): >
To use the RVM "system" Ruby installation: >
let g:ruby_host_prog = 'rvm system do neovim-ruby-host'
<
+==============================================================================
+Node.js integration *provider-nodejs*
+
+Nvim supports Node.js |remote-plugin|s.
+https://github.com/neovim/node-client/
+https://nodejs.org/
+
+NODEJS QUICKSTART~
+
+To use javascript remote-plugins with Nvim, install the `neovim` npm package: >
+ npm install -g neovim
+<
+NODEJS PROVIDER CONFIGURATION~
+ *g:loaded_node_provider*
+To disable Node support: >
+ :let g:loaded_node_provider = 1
+<
+ *g:node_host_prog*
+Command to start the Node host. Setting this makes startup faster.
+
+By default, Nvim searches for `neovim-node-host` using "npm root -g". This is
+rather slow, you can set g:node_host_prog to avoid it.
==============================================================================
Clipboard integration *provider-clipboard* *clipboard*