-
Notifications
You must be signed in to change notification settings - Fork 13
/
LSP-pyright.sublime-settings
87 lines (87 loc) · 4.6 KB
/
LSP-pyright.sublime-settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
"command": ["${node_bin}", "${server_path}", "--stdio"],
"schemes": [
"file", // regular files
"buffer", // in-memory buffers
"res", // files in .sublime-package archives
],
// @see https://github.com/microsoft/pyright/blob/main/docs/settings.md
// @see https://github.com/microsoft/pyright/blob/main/packages/vscode-pyright/package.json
"settings": {
// The (Jinja2) template of the status bar text which is inside the parentheses `(...)`.
// See https://jinja.palletsprojects.com/templates/
"statusText": "{% set parts = [] %}{% if server_version %}{% do parts.append('v' + server_version) %}{% endif %}{% if venv %}{% do parts.append('venv: ' + venv.venv_prompt) %}{% do parts.append('py: ' + venv.python_version) %}{% do parts.append('by: ' + venv.finder_name) %}{% endif %}{{ parts|join('; ') }}",
// The strategies used to find a virtual environment in order.
"venvStrategies": [
"local_dot_venv",
"env_var_conda_prefix",
"env_var_virtual_env",
"rye",
"poetry",
"pdm",
"hatch",
"pipenv",
"pyenv",
"any_subdirectory",
],
// Use a predefined setup from this plugin, valid values are:
// - "": An empty string does nothing.
// - "sublime_text": Suitable for people who are developing ST Python plugins.
// The Python version which the developed plugin runs on will be used.
// `sys.path` from plugin_host will be added into "python.analysis.extraPaths"
// so ST package dependecies can be resolved by the LSP server.
// - "sublime_text_33": Similar to "sublime_text" but Python 3.3 forced.
// - "sublime_text_38": Similar to "sublime_text" but Python 3.8 forced.
// - "blender": Suitable for people who are developing Blender add-ons. `sys.path` from Blender's embedded
// Python interpreter will be added into "python.analysis.extraPaths". Note that this requires
// invoking Blender, headless, to query the additional Python paths. The setting
// "pyright.dev_environment_blender.binary" controls which executable to call to invoke Blender.
// - "gdb": Suitable for people who are developing GDB automation scripts. `sys.path` from GDB's embedded
// Python interpreter will be added into "python.analysis.extraPaths". Note that this requires invoking
// GDB, in batch mode, to query the additional Python paths. The setting
// "pyright.dev_environment_gdb.binary" controls which exectuable to call to invoke GDB.
"pyright.dev_environment": "",
// When the predefined setup is "blender", invoke this binary to query the additional search paths.
"pyright.dev_environment_blender.binary": "blender",
// When the predefined setup is "gdb", invoke this binary to query the additional search paths.
"pyright.dev_environment_gdb.binary": "gdb",
// Offer auto-import completions.
"python.analysis.autoImportCompletions": true,
// Automatically add common search paths like 'src'?
"python.analysis.autoSearchPaths": true,
// Additional import search resolution paths
"python.analysis.extraPaths": [],
// Path to directory containing custom type stub files.
"python.analysis.stubPath": "./typings",
// "openFilesOnly" or "workspace"
"python.analysis.diagnosticMode": "openFilesOnly",
// Allows a user to override the severity levels for individual diagnostics.
// @see https://github.com/microsoft/pyright/blob/main/docs/configuration.md#type-check-diagnostics-settings
"python.analysis.diagnosticSeverityOverrides": {
// "reportDuplicateImport": "warning",
// "reportImplicitStringConcatenation": "warning",
// "reportUnboundVariable": "warning",
// "reportUnusedClass": "information",
// "reportUnusedFunction": "information",
// "reportUnusedImport": "information",
// "reportUnusedVariable": "information",
},
// Specifies the level of logging for the Output panel
"python.analysis.logLevel": "Information",
// Defines the default rule set for type checking.
"python.analysis.typeCheckingMode": "standard",
// Paths to look for typeshed modules.
"python.analysis.typeshedPaths": [],
// Use library implementations to extract type information when type stub is not present.
"python.analysis.useLibraryCodeForTypes": true,
// Disables type completion, definitions, and references.
"pyright.disableLanguageServices": false,
// Disables the "Organize Imports" command.
"pyright.disableOrganizeImports": false,
// Path to Python. Leave empty to attempt automatic resolution.
"python.pythonPath": "",
// Path to folder with a list of Virtual Environments.
"python.venvPath": "",
},
"selector": "source.python",
}