astral-sh/ruff-lsp

How to configure rules in init.lua?

tall-josh opened this issue · 1 comments

Hi, I am moving from lsp-zero to ruff. Is it possible to configure the rules in the init.lua or is this only configurable in pyproject.toml or ruff.toml?

For example:

require("lspconfig").ruff_lsp.setup {
    init_options = {
        settings = {
            lint = {
                enable = true,
                select = { "E4", "E7", "E9", "F", "ARGS" },
            }
        }
    }
}

Never mind. I figured it out ... skill issue

require("lspconfig").ruff_lsp.setup {
    init_options = {
        settings = {
            lint = {
                enable = true,
                args = {
                    "--select=E4,E7,E9,F,ARG",
                }
            }
        }
    }
}