Use pyright (and django-stubs), much better
This commit is contained in:
parent
258b42a1d5
commit
f3bf598361
@ -22,40 +22,41 @@ local handlers = {
|
|||||||
["textdocument/signaturehelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" }),
|
["textdocument/signaturehelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" }),
|
||||||
}
|
}
|
||||||
|
|
||||||
-- require("lspconfig").pyright.setup {
|
require("lspconfig").pyright.setup {
|
||||||
-- on_init = nvlsp.on_init,
|
on_init = nvlsp.on_init,
|
||||||
-- on_attach = nvlsp.on_attach,
|
on_attach = nvlsp.on_attach,
|
||||||
-- capabilities = nvlsp.capabilities,
|
capabilities = nvlsp.capabilities,
|
||||||
-- handlers = handlers,
|
handlers = handlers,
|
||||||
--
|
|
||||||
-- settings = {
|
|
||||||
-- pyright = {
|
|
||||||
-- -- options available here: https://github.com/microsoft/pyright/blob/main/docs/settings.md
|
|
||||||
-- disableorganizeimports = true, -- using ruff
|
|
||||||
-- -- disablelanguageservices = true, -- using ruff
|
|
||||||
-- },
|
|
||||||
-- python = {
|
|
||||||
-- analysis = {
|
|
||||||
-- -- ignore = { "*" }, -- using ruff
|
|
||||||
-- -- typecheckingmode = "off", -- using mypy
|
|
||||||
-- diagnosticseverityoverrides = {
|
|
||||||
-- reportmissingimports = false,
|
|
||||||
-- -- reportattributeaccessissue = false,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
|
|
||||||
require("lspconfig").pylsp.setup {
|
|
||||||
settings = {
|
settings = {
|
||||||
pylsp = {
|
pyright = {
|
||||||
plugins = {
|
-- options available here: https://github.com/microsoft/pyright/blob/main/docs/settings.md
|
||||||
pycodestyle = {
|
disableorganizeimports = true, -- using ruff
|
||||||
ignore = { "W391", "E501" },
|
-- disablelanguageservices = true, -- using ruff
|
||||||
maxLineLength = 100,
|
},
|
||||||
|
python = {
|
||||||
|
analysis = {
|
||||||
|
-- ignore = { "*" }, -- using ruff
|
||||||
|
-- typecheckingmode = "off", -- using mypy
|
||||||
|
diagnosticseverityoverrides = {
|
||||||
|
reportmissingimports = false,
|
||||||
|
-- reportattributeaccessissue = false,
|
||||||
|
reportUnusedVariable = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- require("lspconfig").pylsp.setup {
|
||||||
|
-- settings = {
|
||||||
|
-- pylsp = {
|
||||||
|
-- plugins = {
|
||||||
|
-- pycodestyle = {
|
||||||
|
-- ignore = { "W391", "E501" },
|
||||||
|
-- maxLineLength = 100,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
|||||||
@ -190,6 +190,7 @@ return {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter.configs").setup(require "configs.treesitter_textobjects")
|
require("nvim-treesitter.configs").setup(require "configs.treesitter_textobjects")
|
||||||
end,
|
end,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user