Python analysis options (pyright) (#352)

This commit is contained in:
Francisco Suárez 2021-05-03 15:37:12 -05:00 committed by GitHub
parent 2ca5944956
commit 3adcfdc034
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View file

@ -8,7 +8,15 @@ require'lspconfig'.pyright.setup {
signs = O.python.diagnostics.signs, signs = O.python.diagnostics.signs,
underline = O.python.diagnostics.underline, underline = O.python.diagnostics.underline,
update_in_insert = true update_in_insert = true
}) })
},
settings = {
python = {
analysis = {
typeCheckingMode = O.python.analysis.type_checking,
autoSearchPaths = O.python.analysis.auto_search_paths,
useLibraryCodeForTypes = O.python.analysis.use_library_code_types
}
}
} }
} }

View file

@ -24,7 +24,8 @@ O = {
formatter = '', formatter = '',
autoformat = false, autoformat = false,
isort = false, isort = false,
diagnostics = {virtual_text = true, signs = true, underline = true} diagnostics = {virtual_text = true, signs = true, underline = true},
analysis = {type_checking = "basic", auto_search_paths = true, use_library_code_types = true}
}, },
dart = {sdk_path = '/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot'}, dart = {sdk_path = '/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot'},
lua = { lua = {

View file

@ -34,6 +34,9 @@ O.python.autoformat = true
O.python.diagnostics.virtual_text = true O.python.diagnostics.virtual_text = true
O.python.diagnostics.signs = true O.python.diagnostics.signs = true
O.python.diagnostics.underline = true O.python.diagnostics.underline = true
O.python.analysis.type_checking = "off"
O.python.analysis.auto_search_paths = true
O.python.analysis.use_library_code_types = true
-- lua -- lua
-- TODO look into stylua -- TODO look into stylua