提问人:0xActor 提问时间:11/11/2023 最后编辑:Monsieur Merso0xActor 更新时间:11/15/2023 访问量:18
如何在lsp pyright中关闭reportGeneralTypeIssues?
How I can turn off reportGeneralTypeIssues in lsp pyright?
问:
在nvim中的lspconfig下面,我需要关闭reportGeneralTypeIssues,但是当我将其设置为“none”时它不起作用,我该如何解决?
local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require("lspconfig")
-- if you just want default config for the servers then put them in a table
local servers = { "html", "cssls", "tsserver", "clangd", "rust_analyzer", "pyright" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
on_attach = on_attach,
capabilities = capabilities,
})
end
--
lspconfig.pyright.setup({
settings = {
python = {
analysis = {
reportGeneralTypeIssues = "none"
},
},
},
})
答: 暂无答案
上一个:如何在保存时自动格式化
评论