aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/nvim_python.txt
blob: 1c345b453209206da1d7de976bf26386d5efcbbd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
*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|

==============================================================================
1. Introduction						    *nvim-python-intro*

Through external Python 2/3 interpreters connected via |msgpack-rpc|, Nvim
offers some support for the legacy |python-vim| and |python3| interfaces.

Note: For now only the old Vim 7.3 API is supported.

==============================================================================
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
<
==============================================================================
							   *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
<
==============================================================================
 vim:tw=78:ts=8:noet:ft=help:norl: