doc/python: cleanup

- Move info to providers.txt
- Remove "nvim-" prefix.
- Brevity, clarity, ...
This commit is contained in:
Justin M. Keyes 2016-06-15 01:53:00 -04:00
parent 7718f8f24c
commit 37f560aedf
7 changed files with 95 additions and 123 deletions

View File

@ -106,7 +106,7 @@ function! s:check_interpreter(prog, major_ver, skip) abort
if v:shell_error == 2
return [0, prog_path . ' does not have the neovim module installed. '
\ . 'See ":help nvim-python".']
\ . 'See ":help provider-python".']
elseif v:shell_error == 127
" This can happen with pyenv's shims.
return [0, prog_path . ' does not exist: ' . prog_ver]

View File

@ -16,7 +16,7 @@ The Python Interface to Vim *python* *Python*
8. pyeval(), py3eval() Vim functions |python-pyeval|
9. Python 3 |python3|
See |nvim-python| for more information. {Nvim}
See |provider-python| for more information. {Nvim}
==============================================================================
1. Commands *python-commands*

View File

@ -14,11 +14,10 @@ see |help.txt|.
2. Differences from Vim |vim-differences|
3. Msgpack-RPC |msgpack-rpc|
4. Job control |job-control|
5. Python plugins |nvim-python|
6. Clipboard integration |clipboard|
5. Python plugins |provider-python|
6. Clipboard integration |provider-clipboard|
7. Remote plugins |remote-plugin|
8. Provider infrastructure |provider|
9. Integrated terminal emulator |terminal-emulator|
8. Embedded terminal emulator |terminal-emulator|
==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -16,8 +16,8 @@ it:
ln -s ~/.vim $XDG_CONFIG_HOME/nvim
ln -s ~/.vimrc $XDG_CONFIG_HOME/nvim/init.vim
<
See |nvim-intro|, especially |nvim-python| and |clipboard|, for additional
software you might need to install to use all of Nvim's features.
See |provider-python| and |provider-clipboard| for additional software you
might need to use some features.
Your Vim configuration might not be entirely compatible with Nvim. For a
full list of differences between Vim and Nvim, see |vim-differences|.

View File

@ -1,112 +0,0 @@
*nvim_python.txt* For Nvim. {Nvim}
NVIM REFERENCE MANUAL by Thiago de Arruda
Python plugins and scripting in Nvim *nvim-python*
1. Introduction |nvim-python-intro|
2. Quickstart |nvim-python-quickstart|
3. Troubleshooting |nvim-python-troubleshooting|
==============================================================================
1. Introduction *nvim-python-intro*
Through external Python interpreters connected via |rpc|, Nvim supports the
legacy |python-vim| and |python3| interfaces.
Note: Only the Vim 7.3 API is supported; bindeval (Vim 7.4) is not.
==============================================================================
2. Quickstart *nvim-python-quickstart*
If you used a package manager to install Nvim, there's a good chance that
it also provides the `neovim` Python package. If it doesn't, follow these
steps to install the package with Python's package manager, `pip`.
Note: Depending on your system, `pip` might refer to Python 2 or Python 3,
which is why the following instructions mention `pip2` or `pip3`
explicitly. If one of these is not available for you, maybe `pip`
is what you want.
To use Vim Python 2/3 plugins with Nvim, do the following:
- 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 neovim
<
or for the current user:
>
$ pip2 install --user 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 neovim
<
or for the current user:
>
$ pip3 install --user neovim
<
Note: If you previously installed the package, get the latest version by
appending the `--upgrade` flag to the commands above.
==============================================================================
*g:python_host_prog*
To point Nvim to a specific Python 2 interpreter, set |g:python_host_prog|:
>
let g:python_host_prog = '/path/to/python'
<
*g:python3_host_prog*
To point Nvim to a specific Python 3 interpreter, set |g:python3_host_prog|:
>
let g:python3_host_prog = '/path/to/python3'
<
*g:loaded_python_provider*
To disable Python 2 interface, set `g:loaded_python_provider` to 1:
>
let g:loaded_python_provider = 1
<
*g:loaded_python3_provider*
To disable Python 3 interface, set `g:loaded_python3_provider` to 1:
>
let g:loaded_python3_provider = 1
<
*g:python_host_skip_check*
To disable Python 2 interpreter check, set `g:python_host_skip_check` to 1:
Note: If you disable Python 2 check, you must install neovim module properly.
>
let g:python_host_skip_check = 1
<
*g:python3_host_skip_check*
To disable Python 3 interpreter check, set `g:python3_host_skip_check` to 1:
Note: If you disable Python 3 check, you must install neovim module properly.
>
let g:python3_host_skip_check = 1
<
==============================================================================
3. Troubleshooting *nvim-python-troubleshooting*
If you are experiencing issues with a plugin that uses the `neovim` Python
client, you can use the |:CheckHealth| command to quickly rule out your setup
as a problem.
*:CheckHealth*
:CheckHealth[!] Check your setup for common problems that may be keeping a
plugin from functioning correctly. Including the output of
this command in bug reports can help reduce the amount of
time it takes to address your issue. If [!] is present, the
output will be placed in a new buffer which can make it
easier to save to a file or copy to the clipboard.
==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -9,7 +9,86 @@ Providers *provider*
Nvim delegates some features to dynamic "providers".
==============================================================================
Clipboard integration *clipboard*
Python integration *provider-python*
Nvim supports the Vim legacy |python-vim| and |python3| interfaces via
external Python interpreters connected via |rpc|,
Note: Only the Vim 7.3 API is supported; bindeval (Vim 7.4) is not.
PYTHON QUICKSTART ~
If you used a package manager to install Nvim there's a good chance that
it also provides the `neovim` Python package. If it doesn't, follow these
steps to install the package with Python's package manager, `pip`.
Note: Depending on your system, `pip` might refer to Python 2 or Python 3,
which is why the following instructions mention `pip2` or `pip3`
explicitly. If one of these is not available, try `pip`.
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
<
or for the current user: >
$ 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
<
or for the current user: >
$ pip3 install --user --upgrade neovim
<
Note: The `--upgrade` flag ensures you have the latest version even if
a previous version was already installed.
PYTHON PROVIDER CONFIGURATION ~
*g:python_host_prog*
Set `g:python_host_prog` to point Nvim to a specific Python 2 interpreter: >
let g:python_host_prog = '/path/to/python'
<
*g:python3_host_prog*
Set `g:python3_host_prog` to point Nvim to a specific Python 3 interpreter: >
let g:python3_host_prog = '/path/to/python3'
<
*g:loaded_python_provider*
To disable Python 2 support: >
let g:loaded_python_provider = 1
<
*g:loaded_python3_provider*
To disable Python 3 support: >
let g:loaded_python3_provider = 1
<
*g:python_host_skip_check*
Set `g:python_host_skip_check` to disable the Python 2 interpreter check.
Note: This requires you to install the python-neovim module properly. >
let g:python_host_skip_check = 1
<
*g:python3_host_skip_check*
Set `g:python3_host_skip_check` to disable the Python 3 interpreter check.
Note: This requires you to install the python3-neovim module properly. >
let g:python3_host_skip_check = 1
TROUBLESHOOTING *python-trouble*
If you have trouble with a plugin that uses the `neovim` Python client, use
the |:CheckHealth| command to diagnose your setup.
*:CheckHealth*
:CheckHealth[!] Check your setup for common problems that may be keeping a
plugin from functioning correctly. Include the output of
this command in bug reports to help reduce the amount of
time it takes to address your issue. With "!" the output
will be placed in a new buffer which can make it easier to
save to a file or copy to the clipboard.
==============================================================================
Clipboard integration *provider-clipboard* *clipboard*
Nvim has no direct connection to the system clipboard. Instead it is
accessible through a |provider| which transparently uses shell commands for
@ -36,7 +115,7 @@ following option:
See 'clipboard' for details and more options.
==============================================================================
X11 selection mechanism *clipboard-x11* *x11-selection*
X11 selection mechanism *clipboard-x11* *x11-selection*
The clipboard providers for X11 store text in what is known as "selections".
Selections are "owned" by an application, so when the application is closed,

View File

@ -68,7 +68,7 @@ build).
If a Python interpreter is available on your `$PATH`, |:python| and |:python3|
are always available and may be used simultaneously in separate plugins. The
`neovim` pip package must be installed to use Python plugins in Nvim (see
|nvim-python|).
|provider-python|).
|mkdir()| behaviour changed:
1. Assuming /tmp/foo does not exist and /tmp can be written to
@ -161,6 +161,12 @@ Some `CTRL-SHIFT-...` key chords are distinguished from `CTRL-...` variants
<C-BS>, <C-S-BS>
<C-Enter>, <C-S-Enter>
Options:
'statusline' supports unlimited alignment sections
Commands:
|:CheckHealth|
Events:
|TabNew|
|TabNewEntered|