Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit6532ace

Browse files
vermeerenroxma
authored andcommitted
fallback to neovim if pynvim cannot be imported
Some distributions, such as Debian, have not yet updated adopted thechanged pynvim package name and still use neovim. If importing pynvimfails try to import neovim. If that also fails error as usual.Signed-off-by: Melvin Vermeeren <mail@mel.vin>
1 parent6a77319 commit6532ace

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ open a PR if you get any idea on improving it**.
2929
-[pynvim](https://github.com/neovim/pynvim)
3030
- Pynvim is normally installed by `:py3 import pip; pip.main(['install',
3131
'--user', 'pynvim'])` or`python3 -m pip install pynvim`.
32-
- There should be no error when you execute`:python3 import pynvim`
32+
- There should be no error for at least one of`:python3 import pynvim` and
33+
`:python3 import neovim`
3334
5. Else if`has('python')`
3435
-[pynvim](https://github.com/neovim/pynvim)
3536
- Pynvim is normally installed by `:py import pip; pip.main(['install',
3637
'--user', 'pynvim'])` or`python2 -m pip install pynvim`.
37-
- There should be no error when you execute`:python import pynvim`
38+
- There should be no error for at least one of`:python3 import pynvim` and
39+
`:python3 import neovim`
3840
6.`set encoding=utf-8` in your vimrc.
3941

4042
***Use`:echo neovim_rpc#serveraddr()` to test the installation***. It should print

‎autoload/neovim_rpc.vim‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ func! neovim_rpc#serveraddr()
2626
try
2727
calls:py('import pynvim')
2828
catch
29-
callneovim_rpc#_error("failed executing:" .
30-
\g:neovim_rpc#py ." import pynvim")
31-
callneovim_rpc#_error(v:exception)
32-
throw'[vim-hug-neovim-rpc] requires `:' .g:neovim_rpc#py .
33-
\' import pynvim` command to work'
29+
try
30+
calls:py('import neovim')
31+
catch
32+
callneovim_rpc#_error("failed executing:" .
33+
\g:neovim_rpc#py ." import [pynvim|neovim]")
34+
callneovim_rpc#_error(v:exception)
35+
throw'[vim-hug-neovim-rpc] requires one of `:' .g:neovim_rpc#py .
36+
\' import [pynvim|neovim]` command to work'
37+
endtry
3438
endtry
3539

3640
calls:py('import neovim_rpc_server')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp