@@ -10,12 +10,27 @@ connecting to and scripting Nvim processes through its msgpack-rpc API.
1010#### Installation
1111
1212``` sh
13- pip install neovim
13+ pip2 install neovim
14+ pip3 install neovim
1415```
1516
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+ ```
1934
2035#### Python Plugin API
2136
@@ -84,12 +99,18 @@ to have effect. For details see `:help remote-plugin` in nvim.
8499
85100#### Development
86101
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
90103``` sh
91- pip install .
104+ pip2 install .
105+ pip3 install .
92106```
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.
93114
94115You need to rerun this command if you have changed the code, in order for nvim
95116to use it for the plugin host.
@@ -111,6 +132,18 @@ nosetests
111132But note you need to restart nvim every time you run the tests! Substitute your
112133favorite terminal emulator for ` xterm ` .
113134
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+
114147#### Usage through the python REPL
115148
116149A number of different transports are supported, but the simplest way to get
0 commit comments