49
49
local pyright = {
50
50
on_attach = on_attach ,
51
51
settings = {
52
+ pyright = {
53
+ disableOrganizeImports = false ,
54
+ },
52
55
python = {
53
56
analysis = {
54
57
indexing = true ,
55
58
typecheckingmode = " basic" ,
56
- diagnosticmode = " openfilesonly" ,
59
+ -- diagnosticmode = "openfilesonly",
60
+ diagnosticmode = " workspace" ,
57
61
inlayhints = {
58
62
variabletypes = true ,
59
63
functionreturntypes = true ,
@@ -67,10 +71,31 @@ local pyright = {
67
71
},
68
72
},
69
73
},
74
+ --[[ settings = {
75
+ python = {
76
+ analysis = {
77
+ indexing = true,
78
+ typecheckingmode = "basic",
79
+ -- diagnosticmode = "openfilesonly",
80
+ diagnosticmode = "workspace",
81
+ inlayhints = {
82
+ variabletypes = true,
83
+ functionreturntypes = true,
84
+ },
85
+ stubpath = vim.fn.expand("$home/typings"),
86
+ diagnosticseverityoverrides = {
87
+ reportunusedimport = "information",
88
+ reportunusedfunction = "information",
89
+ reportunusedvariable = "information",
90
+ },
91
+ },
92
+ },
93
+ }, ]]
70
94
}
71
95
72
96
local jedi = {
73
97
on_attach = on_attach ,
98
+ capabilities = capabilities ,
74
99
settings = {
75
100
python = {
76
101
analysis = {
@@ -110,7 +135,7 @@ local jedi = {
110
135
},
111
136
}
112
137
113
- local use_pyright = false
138
+ local use_pyright = true
114
139
if use_pyright then
115
140
require (" lspconfig" ).pyright .setup (pyright )
116
141
else
0 commit comments