Skip to content

Use per-file-ignores with Ruff extension for Zed #14642

Answered by dhruvmanila
prepin asked this question in Q&A
Discussion options

You must be logged in to vote

The issue was that Ruff, for some reason, ignores local pyproject.toml if there is no global configuration file.

I don't think this should happen. If you have a local config file and additional settings in the initialization options, the server should pick up both of them and merge unless you've overridden the ruff.configurationPreference setting which I think you haven't.

Here's what I'm testing it against - I've a project whose root contains a pyproject.toml and a Python file with the following code:

import math
import click

The Zed settings:

{
  "lsp": {
    "ruff": {
      "initialization_options": {
        "settings": {
          "lint": {
            "extendSelect": ["I"]
       …

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@prepin
Comment options

@dhruvmanila
Comment options

Answer selected by prepin
@prepin
Comment options

@dhruvmanila
Comment options

@dhruvmanila
Comment options

@prepin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants