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" }),
|
||||
}
|
||||
|
||||
-- require("lspconfig").pyright.setup {
|
||||
-- on_init = nvlsp.on_init,
|
||||
-- on_attach = nvlsp.on_attach,
|
||||
-- capabilities = nvlsp.capabilities,
|
||||
-- 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").pyright.setup {
|
||||
on_init = nvlsp.on_init,
|
||||
on_attach = nvlsp.on_attach,
|
||||
capabilities = nvlsp.capabilities,
|
||||
handlers = handlers,
|
||||
|
||||
require("lspconfig").pylsp.setup {
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pycodestyle = {
|
||||
ignore = { "W391", "E501" },
|
||||
maxLineLength = 100,
|
||||
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,
|
||||
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",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup(require "configs.treesitter_textobjects")
|
||||
end,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user