-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
needs-infoMore information is needed from the issue authorMore information is needed from the issue authorserverRelated to the LSP serverRelated to the LSP server
Description
Summary
I have a project with this structure:
├── pyproject.toml
└── sub/
├── main.py
└── pyproject.toml
ruff server
seems to always use the pyproject.toml
defined in the root, even if ruff server
is called with cwd
set to sub
. This is inconsistent with ruff check
.
Reproduction steps:
mkdir ruff_issue
cd ruff_issue
git init
echo '[tool.ruff]\nexclude=["sub"]' > pyproject.toml
mkdir sub
touch sub/pyproject.toml
echo 'print "Hello world!"' > sub/main.py
git add \
pyproject.toml
sub/pyproject.toml \
sub/main.py
git commit -m "Initial commit"
ruff check # uses root pyproject.toml, reports no issues, expected
# ruff server with cwd set to root, reports no issues, expected
cd sub
ruff check # uses sub/pyproject.toml, reports issues, expected
# ruff server with cwd set to sub, reports no issues, NOT EXPECTED
I don't know how to get diagnostics from ruff server
without using an editor. I'm currently using Neovim with the default config defined in https://github.com/neovim/nvim-lspconfig which simply calls ruff server
in the directory of the closest pyproject.toml
in a bottom-up search.
Version
ruff 0.14.0
Metadata
Metadata
Assignees
Labels
needs-infoMore information is needed from the issue authorMore information is needed from the issue authorserverRelated to the LSP serverRelated to the LSP server