@@ -10,12 +10,27 @@ connecting to and scripting Nvim processes through its msgpack-rpc API.
10
10
#### Installation
11
11
12
12
``` sh
13
- pip install neovim
13
+ pip2 install neovim
14
+ pip3 install neovim
14
15
```
15
16
16
- You can install the package without being root by adding the ` --user ` flag. You
17
- can use ` pip2 ` and ` pip3 ` to explicitly install for python2 and python3,
18
- respectively.
17
+ If you only use one of python2 or python3, it is enough to install that
18
+ version. You can install the package without being root by adding the ` --user `
19
+ flag.
20
+
21
+ If you follow Neovim master, make sure to upgrade the python-client when you
22
+ upgrade neovim:
23
+ ``` sh
24
+ pip2 install --upgrade neovim
25
+ pip3 install --upgrade neovim
26
+ ```
27
+
28
+ Alternatively, the master version could be installed by executing the following
29
+ in the root of this repository:
30
+ ``` sh
31
+ pip2 install .
32
+ pip3 install .
33
+ ```
19
34
20
35
#### Python Plugin API
21
36
@@ -84,12 +99,18 @@ to have effect. For details see `:help remote-plugin` in nvim.
84
99
85
100
#### Development
86
101
87
- Install the master version by cloning this repository and in the root directory
88
- execute
89
-
102
+ If you change the code, you need to run
90
103
``` sh
91
- pip install .
104
+ pip2 install .
105
+ pip3 install .
92
106
```
107
+ for the changes to have effect. Alternatively you could execute neovim
108
+ with the ` $PYTHONPATH ` environment variable
109
+ ```
110
+ PYTHONPATH=/path/to/python-client nvim
111
+ ```
112
+ But note this is not completely reliable as installed packages can appear before
113
+ ` $PYTHONPATH ` in the python search path.
93
114
94
115
You need to rerun this command if you have changed the code, in order for nvim
95
116
to use it for the plugin host.
@@ -111,6 +132,18 @@ nosetests
111
132
But note you need to restart nvim every time you run the tests! Substitute your
112
133
favorite terminal emulator for ` xterm ` .
113
134
135
+ #### Troubleshooting
136
+
137
+ You can run the plugin host in nvim with logging enabled to debug errors:
138
+ ```
139
+ NVIM_PYTHON_LOG_FILE=logfile NVIM_PYTHON_LOG_LEVEL=DEBUG nvim
140
+ ```
141
+ As more than one python host process might be started, the log filenames take
142
+ the pattern ` logfile_PID ` where ` PID ` is the process id.
143
+
144
+ If the host cannot start at all, the error could be found in ` ~/.nvimlog ` if
145
+ ` nvim ` was compiled with logging.
146
+
114
147
#### Usage through the python REPL
115
148
116
149
A number of different transports are supported, but the simplest way to get
0 commit comments