mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	node/provider: support g:node_host_prog #8135
This commit is contained in:
		| @@ -38,6 +38,9 @@ function! provider#node#can_inspect() abort | |||||||
| endfunction | endfunction | ||||||
|  |  | ||||||
| function! provider#node#Detect() abort | 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, '') |   let global_modules = get(split(system('npm root -g'), "\n"), 0, '') | ||||||
|   if v:shell_error || !isdirectory(global_modules) |   if v:shell_error || !isdirectory(global_modules) | ||||||
|     return '' |     return '' | ||||||
|   | |||||||
| @@ -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 | - 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: > |   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: > |   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 | - 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: > |   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: > |   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 | 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 ~ | PYTHON PROVIDER CONFIGURATION ~ | ||||||
| 						*g:python_host_prog* | 						*g:python_host_prog* | ||||||
| @@ -93,7 +93,7 @@ Run |:checkhealth| to see if your system is up-to-date. | |||||||
| RUBY QUICKSTART ~ | RUBY QUICKSTART ~ | ||||||
|  |  | ||||||
| To use Vim Ruby plugins with Nvim, just install the latest `neovim` RubyGem: > | To use Vim Ruby plugins with Nvim, just install the latest `neovim` RubyGem: > | ||||||
|     $ gem install neovim |     gem install neovim | ||||||
|  |  | ||||||
| RUBY PROVIDER CONFIGURATION ~ | RUBY PROVIDER CONFIGURATION ~ | ||||||
| 						*g:loaded_ruby_provider* | 						*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: > | To use the RVM "system" Ruby installation: > | ||||||
|     let g:ruby_host_prog = 'rvm system do neovim-ruby-host' |     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* | Clipboard integration 			      *provider-clipboard* *clipboard* | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 chemzqm
					chemzqm