editorconfig / editorconfig-vim

EditorConfig plugin for Vim
http://editorconfig.org
Other
3.14k stars 139 forks source link

Python related problem in NeoVim #59

Closed alerque closed 8 years ago

alerque commented 8 years ago

I've started having trouble with this plugin in newer (last few months) NeoVim builds. I was originally using Vundle, and have recently switched to vim-plug to manage my plugins. I was hoping this was some problem in the way the plugin was being updated, but I'm now having exactly the same problem with everything freshened up, so here it is. This is with NeoVim 0.1.2 and the latest master branch of editorconfig-vim.

When I launch nvim, I get an error like this:

❯❯❯ nvim
function <SNR>63_InitializePythonBuiltin..provider#python#Call..remote#host#Require..<SNR>62_RequirePythonHost, line 15
Vim(if):Channel was closed by the client
Failed to load python host. You can try to see what happened by starting Neovim with the environment variable $NVIM_PYTHON_LOG_FILE set to a file and opening the generated log file. Also, the host stderr will be available in Neovim log, so it may contain useful information. See also ~/.nvimlog.
Press ENTER or type command to continue

Setting the noted environment variable generated a log file with the PID appended to the name, but the file is blank. The ~/.nvimlog file is likewise blank. I am unable to get any useful debug information beyond this error.

I do have the python-editorconfig parser installed separately:

❯❯❯ /usr/bin/editorconfig -v
EditorConfig Python Core Version 0.12.0

However even without that, I have the python bindings enabled in NeoVim with both python-neovim and python2-neovim packages installed, so it should work with either internal or external methods. I've even tried setting g:EditorConfig_core_mode to override the default but there is no change to the error above.

My system default python binary is for 3.5.1, but a python2 is also available.

DoG-peer commented 8 years ago

I also got the same error. I installed editorconfig/editorconfig-core-c by sudo apt-get install editorconfig. I added the following setting to my init.vim.

let g:EditorConfig_core_mode = 'external_command'

Then, editorconfig-vim works well again.

xuhdev commented 8 years ago

Sorry for the delay. Can you try the latest version? We have supported Python 3 recently.

alerque commented 8 years ago

Seems to work for me now.