[Python] LazyVim LSP ignore errors

Discussão em 'Python' iniciado por Stack, Março 7, 2025.

  1. Stack

    Stack Membro Participativo

    I'm attempting to configure pylsp to ignore or modify certain errors such as line length. Following the documentation for pylsp and lazyvim, I have created a pylspignore.lua file and placed it in my ~/.config/nvim/lua/plugins/ directory. In my pylspingore.lua file I have the following

    require("lspconfig").pylsp.setup({
    settings = {
    pylsp = {
    plugins = {
    pycodestyle = {
    ignore = { "W391" },
    maxLineLength = 100,
    },
    },
    },
    },
    })


    However now whenever I run :healthcheck I see the following errors:

    lazy: require("lazy.health").check()

    lazy.nvim ~
    - OK Git installed
    - OK no existing packages found by other package managers
    - OK packer_compiled.lua not found
    - ERROR Issues were reported when loading your specs:
    - ERROR Invalid spec module: `plugins.pycodestyle-ignore`
    - ERROR Expected a `table` of specs, but a `boolean` was returned instead



    Can someone please suggest where I have gone wrong in setting up my LSP?

    Continue reading...

Compartilhe esta Página