-
Notifications
You must be signed in to change notification settings - Fork 18
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
Support black preview flag #35
Comments
Hello @mattishallen, sorry for the late reply. Can you look at the LSP server's log messages? python-lsp-black has logging about which configuration file is found and used. You might need to increase the logging level of LSP server. |
Hi both, In case it helps, I am finding a similar issue to @mattishallen's in My running
A My
|
Maybe setting a python-lsp-black/pylsp_black/plugin.py Line 85 in c3c0c1d
|
@JesusTorrado Would you mind creating a PR with the fix at https://github.com/JesusTorrado/python-lsp-black/commit/4b8000753c09e55a5c385175e542e686c520a21d? |
Added missing `preview` kwarg in `black.FileMode`. Fixes #35.
I apologize for the long delay, I have merged the changes and I'm working towards making a new release with this and other changes. |
@haplo, no apology needed. Everything you do is much appreciated and I thank you for making it possible for us to use black with lsp. Keep up the good work! |
Thank you for the kind words. ❤️ The reality is that I used to work daily with Python, so I was an active user. Now I use Python more sporadically for some personal projects, so finding time for maintenance is harder. In other news: python-lsp-black 1.3.0 is out! 🎉 |
Hi! I use this plugin with neovim's built in LSP and call it from
vim.lsp.buf.formatting
. The formatting works but it does not respect my black configurations, neither my global config in~/.config/black
norpyproject.toml
in project roots. I also have black installed from pip and there everything works fine.pyproject.toml
:pylsp-black config in
init.lua
:However when I format this code
the underlined error (line length 83 > 80) is not formatted. If i format this using
black
directly in a shell it is formatted.The text was updated successfully, but these errors were encountered: