coc-pyright 1.1.190 → 1.1.191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,6 +67,7 @@ These configurations are used by `coc-pyright`, you need to set them in your `co
67
67
  | pyright.server | Custom `pyright-langserver` path | '' |
68
68
  | pyright.disableCompletion | Disables completion from Pyright, left other LSP features work | false |
69
69
  | pyright.disableDiagnostics | Disable diagnostics from Pyright | false |
70
+ | pyright.completion.importSupport | Enable `python-import` completion source support | true |
70
71
  | pyright.completion.snippetSupport | Enable completion snippets support | true |
71
72
  | pyright.organizeimports.provider | Organize imports provider, `pyright` or `isort` | pyright |
72
73
 
package/lib/index.js CHANGED
@@ -23454,8 +23454,11 @@ async function activate(context) {
23454
23454
  context.subscriptions.push(new LinterProvider(context));
23455
23455
  const codeActionProvider = new PythonCodeActionProvider();
23456
23456
  context.subscriptions.push(import_coc24.languages.registerCodeActionProvider(documentSelector, codeActionProvider, "Pyright"));
23457
- const provider = new ImportCompletionProvider();
23458
- context.subscriptions.push(import_coc24.languages.registerCompletionItemProvider("python-import", "PY", ["python"], provider, [" "]));
23457
+ const importSupport = pyrightCfg.get("completion.importSupport");
23458
+ if (importSupport) {
23459
+ const provider = new ImportCompletionProvider();
23460
+ context.subscriptions.push(import_coc24.languages.registerCompletionItemProvider("python-import", "PY", ["python"], provider, [" "]));
23461
+ }
23459
23462
  const textEditorCommands = ["pyright.organizeimports", "pyright.addoptionalforparam"];
23460
23463
  textEditorCommands.forEach((commandName) => {
23461
23464
  context.subscriptions.push(import_coc24.commands.registerCommand(commandName, async (offset) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coc-pyright",
3
- "version": "1.1.190",
3
+ "version": "1.1.191",
4
4
  "description": "Pyright extension for coc.nvim, static type checker for Python",
5
5
  "author": "Heyward Fann <fannheyward@gmail.com>",
6
6
  "license": "MIT",
@@ -163,7 +163,7 @@
163
163
  "reportPropertyTypeMismatch": {
164
164
  "type": "string",
165
165
  "description": "Diagnostics for property whose setter and getter have mismatched types.",
166
- "default": "error",
166
+ "default": "none",
167
167
  "enum": [
168
168
  "none",
169
169
  "information",
@@ -1271,6 +1271,11 @@
1271
1271
  "default": false,
1272
1272
  "description": "Disable diagnostics from Pyright"
1273
1273
  },
1274
+ "pyright.completion.importSupport": {
1275
+ "type": "boolean",
1276
+ "default": true,
1277
+ "description": "Enable `python-import` completion source, will list suggestions after input `import`"
1278
+ },
1274
1279
  "pyright.completion.snippetSupport": {
1275
1280
  "type": "boolean",
1276
1281
  "default": true,
@@ -1342,6 +1347,6 @@
1342
1347
  ]
1343
1348
  },
1344
1349
  "dependencies": {
1345
- "pyright": "^1.1.190"
1350
+ "pyright": "^1.1.191"
1346
1351
  }
1347
1352
  }
@@ -141,7 +141,7 @@
141
141
  "$id": "#/properties/reportPropertyTypeMismatch",
142
142
  "$ref": "#/definitions/diagnostic",
143
143
  "title": "Controls reporting of property getter/setter type mismatches",
144
- "default": "error"
144
+ "default": "none"
145
145
  },
146
146
  "reportFunctionMemberAccess": {
147
147
  "$id": "#/properties/reportFunctionMemberAccess",