Skip to content

ruff server: duplicate code actions #11516

@ravibrock

Description

@ravibrock
ruff
    An extremely fast Python linter and code formatter, written in Rust.

    installed version 0.4.5                              
    homepage          https://github.com/astral-sh/ruff/ 
    languages         Python                             
    categories        Linter, Formatter, LSP             
    executables       ruff                               

I switched from ruff-lsp to ruff today in Neovim and noticed that there were duplicate code actions (that as far as I can tell work identically):
Screenshot 2024-05-23 at 09 50 22
(Note: It appears to only be the organize imports and fix all auto-fixable problems that are duplicated. The disable for this line action only appears once, as it should.)

I tried searching "duplicate code action".

I confirmed that ruff-lsp is not installed anymore:
Screenshot 2024-05-23 at 09 51 31

Minimal ruff configuration:

local on_attach = function(client, _)
    if client.name == "ruff" then
        client.server_capabilities.hoverProvider = false
    end
end
require("mason-lspconfig").setup({
    ensure_installed = { "ruff" },
     ["ruff"] = function()
         require("lspconfig").ruff.setup({ on_attach = on_attach })
     end,
})

Metadata

Metadata

Assignees

Labels

serverRelated to the LSP server

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions