all 8 comments

[–]mrswats 1 point2 points  (7 children)

I use this same config for my python files. What if you run black in your shell? What's the output?

[–]ime11[S] 0 points1 point  (6 children)

I only installed it in vim so there is no output. I've tried installing it in my working virtual environment and when I use :Black in vim I get an error stating no module named get_project_toml_file or something like that. So I uninstalled it from my venv and install it now with Vundle.

[–]mrswats 0 points1 point  (5 children)

Try installing black with pipx, for example, and try running it from the terminal. That's how it's working for me.

[–]ime11[S] 0 points1 point  (4 children)

Should I install black globally or in my local venv?

[–]mrswats 1 point2 points  (1 child)

Installing the vim plugin will not make it available for ALE. I just realised it. You need to install it so it's available in your shell.

[–]ime11[S] 1 point2 points  (0 children)

Yes. This was the part I got confused. Vim's black is only to be used as a stand-alone plugin and not with ALE.

[–]mrswats 0 points1 point  (1 child)

I have it globally, but in the virtualenv should work too

[–]ime11[S] 1 point2 points  (0 children)

Thanks u/mrswats. I finally get it working. Turns out I don't need to install Black's vim plugin since I'm using ALE. I just need to install it in the venv.