-
-
Notifications
You must be signed in to change notification settings - Fork 342
Description
I use neovim with the ruff-lsp and it has been a great experience. I recently started working on a project that uses hatch and was confused why the hatch fmt
command was reporting errors that my editor was not. Looking at the pyproject.toml config, I didn't see the offending rules being selected. Investigating further, I see that hatch is actually pulling a config through ruff check --config '/.../hatch/env/.internal/hatch-static-analysis/.config/jhjYtIFM/pyproject.toml' .
. I didn't know what this config was or where it came from. Obviously ruff-lsp doesn't know about it either.
The "hiding" of the config (not in the root pyproject.toml or ruff.toml) seems to be a major drawback. It seems like what hatch really needs is presets (shared base configs) a la eslint. This is not yet supported as far as I know (issue).
We could use ruff's config extension feature if we knew where the hatch base config was living. Ideally hatch would just put the ruff config in the root pyproject.toml to make it obvious.
I'm also open to any suggestions for how to make this work. Thanks.