Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve vim plugin error message if vim is too old or python support is missing #4437

Open
nirs opened this issue Aug 15, 2024 · 1 comment
Labels
T: bug Something isn't working

Comments

@nirs
Copy link

nirs commented Aug 15, 2024

When trying the black vim plugin in builtin vim in macOS 14, we get this unclear error message:

The black.vim plugin requires vim7.0+ with Python 3.6 support.

The issues is that the builtin vim is not compiled with python3:

% /usr/bin/vim --version | grep python3
+cmdline_info      +libcall           -python3           +virtualedit

No issue with vim from homebrew:

% /opt/homebrew/bin/vim --version | grep python3
+cmdline_info      +libcall           +python3           +virtualedit

The error message is correct about the requirement, but not helpful to users.

This will be a more useful behavior:

  • If vim version is too old, fail with a message about vim version
  • If python3 support is missing, fail with a message about missing python support

Also the name of the helper function __BLACK_MISSING is confusing since black
is not missing but cannot be used with this vim executable.

Finally based on README.md, python3.8+ is required not, but the message is about python 3.6.

@nirs nirs added the T: bug Something isn't working label Aug 15, 2024
@Typocalypse
Copy link

@nirs I will highly appreciate your suggestion. #4441

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants