Black: Neovim version error.

Created on 9 Nov 2019  Â·  3Comments  Â·  Source: psf/black

Describe the bug A clear and concise description of what the bug is.

There is an error in the black.vim plugin which doesn't check which type of vim is being run only the version of vim. I am using neovim which is currently on the stable version 0.4.3. The black.vim plugin is checking for a vim version of over 7. The plugin seems to work fine on nvim version 0.3.8 other than this annoying echo before opening every python file.

To Reproduce Steps to reproduce the behavior:

Within a pipenv venv.

➜ nvim
This script requires vim7.0+ with Python 3.6 support.
Press ENTER or type command to continue

Expected behavior A clear and concise description of what you expected to happen.

Opening a python file in nvim and not getting the echoed error.

Environment (please complete the following information):

  • Version: [19.10b0]
  • Python: 3.7.5rc1
  • OS: Ubuntu 19.10 eoan
  • Kernel: x86_64 Linux 5.3.0-20-generic
  • Neovim: v0.3.8

Does this bug also happen on master? To answer this, you have two options:

The following line shows the bug clearly happens on the master branch.
https://github.com/psf/black/blob/master/plugin/black.vim#L16
I suggest a conditional be added which checks for the type of vim being run. vim vs nvim before checking the version.

Additional context Add any other context about the problem here.

bug

Most helpful comment

for others who wind up here:

Unlike vim, neovim supports python via remote plugins. Make sure you have the python package "neovim" installed in your current environment i.e.

pip install neovim

for more information, the documentation explaining python integration is available at neovim help page :help provider-python

All 3 comments

After doing some research into .vim plugins it appears there is no issue with the black.vim plugin code. The issue seems to be with the venv and vim.

for others who wind up here:

Unlike vim, neovim supports python via remote plugins. Make sure you have the python package "neovim" installed in your current environment i.e.

pip install neovim

for more information, the documentation explaining python integration is available at neovim help page :help provider-python

Consider adding this to the readme.

Was this page helpful?
0 / 5 - 0 ratings