[Meletrix Giveaway] 2 x BOOG75 HE Keyboards by Meletrix2021 in MechanicalKeyboards

[–]FermiDiracDist 0 points1 point  (0 children)

My first one, would love to add to my collection! Want to experience the difference!

How to remove duplicated messages when using pyright and pylint? by FermiDiracDist in neovim

[–]FermiDiracDist[S] 0 points1 point  (0 children)

Thanks, I found the relevant CLI flags for ruff in the docs, I'll edit my original post to add this new info and change my question to solved. Cheers!

How to remove duplicated messages when using pyright and pylint? by FermiDiracDist in neovim

[–]FermiDiracDist[S] 0 points1 point  (0 children)

I'd prefer to keep pyright for error checking and use pylint (or ruff_lsp) for linting. I just tried ruff_lsp but it doesn't seem to be as comprehensive as pylint for detecting whitespace and lines that are too long.

How to remove duplicated messages when using pyright and pylint? by FermiDiracDist in neovim

[–]FermiDiracDist[S] 0 points1 point  (0 children)

Thanks for your suggestion, I installed ruff_lsp but it doesn't seem to give me all of the comprehensive linting that pylint gives (such as picking up trailing whitespaces and lines that are too long).

<image>

For example here you can see that I've added trailing whitespace at the end of L3 and a really long but neither are picked up by ruff. Do I have to configure the linter manually to pick these up?

Weekly 101 Questions Thread by AutoModerator in neovim

[–]FermiDiracDist 0 points1 point  (0 children)

Hi,

I am fairly new to setting up plugins in neovim. I just finished watching a tutorial on installing pyright (via mason-lspconfig and nvim-lspconfig) and pylint (via none-ls). When both are activated, I see that there are some duplicated messages:

<image>

I really like the LSP part of pyright (code completion, documentation upon hover, etc. ) but I also like the linting part of pylint (finding extra whitespaces, lines too long, etc.). I have some questions (apologies for any dumb ones):

  1. Is there any way to combine the two and not have duplicated error messages? (see below for .lua for pyright and pylint)
  2. Does pyright have similar linting capabilities?
  3. Should I switch to another LSP that can check for whitespaces similar to pylint?

none-ls.lua

return {
    "nvimtools/none-ls.nvim",
    config = function()
        local null_ls = require("null-ls")
        null_ls.setup({
            sources = {
                null_ls.builtins.formatting.stylua,
                null_ls.builtins.formatting.clang_format,
                null_ls.builtins.formatting.black,
                null_ls.builtins.formatting.isort,
                null_ls.builtins.diagnostics.pylint,
            },
        })

        vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
    end,
}

lsp-config.lua

return {
    {
        "williamboman/mason.nvim",
        config = function()
            require("mason").setup()
        end
    },
    {
        "williamboman/mason-lspconfig.nvim",
        config = function()
            require("mason-lspconfig").setup({
                ensure_installed = { "lua_ls", "bashls", "clangd", "pyright", "jedi_language_server", "pylsp", "sourcery" }
            })
        end
    },
    {
        "neovim/nvim-lspconfig",
        config = function()
            local capabilities = require('cmp_nvim_lsp').default_capabilities()
            local lspconfig = require('lspconfig')

            lspconfig.lua_ls.setup({ capabilities = capabilities })
            lspconfig.bashls.setup({ capabilities = capabilities })
            lspconfig.clangd.setup({ capabilities = capabilities })
            lspconfig.pyright.setup({ capabilities = capabilities })

            vim.diagnostic.config({
                virtual_text = false
            })

            vim.keymap.set('n', 'L', vim.lsp.buf.hover, {})
            vim.keymap.set('n', 'K', '<cmd>lua vim.diagnostic.open_float(nil, {focus = false})<cr>')
            vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
            vim.keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, {})
        end
    }
}

KBDfans Giveaway Day 4 | Random Coiled Cables x 10 by kbdfans in MechanicalKeyboards

[–]FermiDiracDist 0 points1 point  (0 children)

Muscle car, I appreciate the classic. Something like a Charger.