I’m enjoying trying out cursor with a Python project. I’m loving. it. Thank you very much!
The ms-python Black Formatter extension (the one with 2.2M downloads) seems not to work. Worked fine in regular vs code. Not a big deal, but I just got addicted to the auto-formatting.
I tried with the pre-rel v2024.1.10331006, and the rel v2024.0.0
Anything in particular to change or do? Happy to try something.
Thanks!
It seems like something detects file changes, as in the Output window log for Black Formatter I can see ‘textDocument/didChange’ when I type, but it seems like it just never sends commands to reformat? I.e. I can change the file to something which should trigger a reformat, save it, and nothing happens except for the didChange events:
2024-05-18 14:14:11.640 [info] Global settings received on server:
{
"cwd": "/vscode/cursor-server/bin/linux-x64/2dd5b2855ac68f3a3d3babee87d22b399a9db7d0",
"workspace": "/vscode/cursor-server/bin/linux-x64/2dd5b2855ac68f3a3d3babee87d22b399a9db7d0",
"args": [
"--config",
"src/pyproject.toml"
],
"path": [],
"interpreter": [],
"importStrategy": "fromEnvironment",
"showNotifications": "always"
}
2024-05-18 14:14:11.640 [info] sys.path used to run Server:
/home/python/.cursor-server/extensions/ms-python.black-formatter-2024.2.0-universal/bundled/tool
/app/src
/app/src/wsgi
/usr/local/lib/python312.zip
/usr/local/lib/python3.12
/usr/local/lib/python3.12/lib-dynload
/app/src/venv/lib/python3.12/site-packages
/home/python/.cursor-server/extensions/ms-python.black-formatter-2024.2.0-universal/bundled/libs
2024-05-18 14:14:11.643 [info] /app/src/venv/bin/python -m black --version
2024-05-18 14:14:11.643 [info] CWD formatter: /app
2024-05-18 14:14:11.740 [info] Version info for formatter running for /app:
black, 24.4.0 (compiled: yes)
Python (CPython) 3.12.2
2024-05-18 14:14:11.740 [info] SUPPORTED black>=22.3.0
FOUND black==24.4.0
2024-05-18 14:16:32.309 [info] [Trace - 2:16:32 PM] Sending notification 'textDocument/didChange'.
2024-05-18 14:16:33.631 [info] [Trace - 2:16:33 PM] Sending notification 'textDocument/didChange'.
2024-05-18 14:16:36.539 [info] [Trace - 2:16:36 PM] Sending notification 'textDocument/didChange'.
2024-05-18 14:16:43.330 [info] [Trace - 2:16:43 PM] Sending notification 'textDocument/didChange'.
Hey, unfortunately we are unable to support 3rd party extensions ourselves, but if anyone diagnoses the cause of this issue and it’s something we can fix on our end, do let us know!
@danperks So you are saying a plugin that works everywhere but in cursor isn’t a cursor problem? I works at the command-line, it works in vscode. It only doesn’t work in cursor.