From 5b81cb636f928bbbce9e6c017a3634cd6329daf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sat, 23 Mar 2024 12:33:12 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(nvim):=20moved=20?= =?UTF-8?q?python=20lsp=20definition=20to=20the=20python=20extra=20and=20a?= =?UTF-8?q?dded=20some=20options=20to=20the=20basedpyright=20lsp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/config/options.lua | 4 --- .../plugins/extras/lang/python-extended.lua | 25 +++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua index 466ffc84..b45227dd 100644 --- a/.config/nvim/lua/config/options.lua +++ b/.config/nvim/lua/config/options.lua @@ -50,7 +50,3 @@ if vim.fn.has("nvim-0.10") == 1 then end o.conceallevel = 2 - --- LSP Server to use for Python. --- Set to "basedpyright" to use basedpyright instead of pyright. -vim.g.lazyvim_python_lsp = "basedpyright" diff --git a/.config/nvim/lua/plugins/extras/lang/python-extended.lua b/.config/nvim/lua/plugins/extras/lang/python-extended.lua index e51ac712..7736a368 100644 --- a/.config/nvim/lua/plugins/extras/lang/python-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/python-extended.lua @@ -1,3 +1,7 @@ +-- LSP Server to use for Python. +-- Set to "basedpyright" to use basedpyright instead of pyright. +vim.g.lazyvim_python_lsp = "basedpyright" + return { { import = "lazyvim.plugins.extras.lang.python" }, { import = "lazyvim.plugins.extras.lang.python-semshi" }, @@ -5,6 +9,27 @@ return { "neovim/nvim-lspconfig", opts = { servers = { + ---@type lspconfig.options.basedpyright + basedpyright = { + settings = { + basedpyright = { + analysis = { + diagnosticSeverityOverrides = { + reportUnusedCallResult = "information", + reportUnusedExpression = "information", + reportUnknownMemberType = "none", + reportUnknownLambdaType = "none", + reportUnknownParameterType = "none", + reportMissingParameterType = "none", + reportUnknownVariableType = "none", + reportUnknownArgumentType = "none", + reportAny = "none", + }, + }, + }, + }, + }, + ---@type lspconfig.options.pyright pyright = { settings = { verboseOutput = true,