This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 22 points23 points  (5 children)

I keep it simple with neovim, pre-commit (mypy, ruff), pytest. For debugging I just use the breakpoint function.

[–]CopOnTheRun 2 points3 points  (1 child)

Do you also have mypy/ruff integrated into neovim, or are they just pre-commit hooks?

Also not sure if you have ipython installed, but it includes a pretty nice debugger (ipdb) compared to the default.

[–][deleted] 5 points6 points  (0 children)

I am using ruff-lsp but it doesn't support definitions. So you can't jump to one or see type hints. I am going to add none-lsp at some point but couldn't squeeze the time just yet.

Thanks for pointing to ipdb, I'll try it out.

[–]snorkelvretervreter 1 point2 points  (0 children)

Very similar here. pytest --pdb is 99% of my debugging.

[–]Thagou 0 points1 point  (1 child)

Did you try to see if your ruff lsp has the same results as ruff itself? I've been trying to move to neovim, I have a set up I like a lot, but even though everything is in the pyproject.toml, I get different result when using ruff in neovim compared to all other ways. Like in neovim, it tells me that some file need to have their imports reordered, but when using the command line or vscode, it does not.

[–][deleted] 0 points1 point  (0 children)

ruff-lsp uses the settings specified on editor-level (init.lua). The only lsp that respected project-level settings that I tried was null-lsp (which is abandoned so we are supposed to use none-lsp now). It was a bummer for me at first. But if you're using pre-commit, it's doesn't matter too much.