diff --git a/lua/astrocommunity/pack/python/init.lua b/lua/astrocommunity/pack/python/init.lua index 2af132252..bac6ad8d8 100644 --- a/lua/astrocommunity/pack/python/init.lua +++ b/lua/astrocommunity/pack/python/init.lua @@ -7,7 +7,29 @@ return { ---@diagnostic disable: missing-fields config = { basedpyright = { - before_init = function(_, c) c.settings.python.pythonPath = vim.fn.exepath "python" end, + before_init = function(_, c) + if not c.settings then c.settings = {} end + if not c.settings.python then c.settings.python = {} end + c.settings.python.pythonPath = vim.fn.exepath "python" + end, + settings = { + basedpyright = { + analysis = { + typeCheckingMode = "basic", + autoImportCompletions = true, + stubPath = vim.env.HOME .. "/typings", + diagnosticSeverityOverrides = { + reportUnusedImport = "information", + reportUnusedFunction = "information", + reportUnusedVariable = "information", + reportGeneralTypeIssues = "none", + reportOptionalMemberAccess = "none", + reportOptionalSubscript = "none", + reportPrivateImportUsage = "none", + }, + }, + }, + }, }, }, },