Skip to content

Commit

Permalink
import pynvim when available. close #26.
Browse files Browse the repository at this point in the history
Thanks to @mcchrish
  • Loading branch information
roxma committed Dec 23, 2018
1 parent 5443ac0 commit 69951f8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pythonx/yarp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
from neovim import attach, setup_logging
from importlib.util import find_spec

if find_spec('pynvim'):
from pynvim import attach, setup_logging
else:
from neovim import attach, setup_logging

import sys
import importlib
from os import environ
Expand Down

0 comments on commit 69951f8

Please sign in to comment.