{"id":13479360,"url":"https://github.com/fannheyward/coc-pyright","last_synced_at":"2025-05-13T23:09:00.208Z","repository":{"id":37545862,"uuid":"206504802","full_name":"fannheyward/coc-pyright","owner":"fannheyward","description":"Pyright extension for coc.nvim","archived":false,"fork":false,"pushed_at":"2025-05-01T06:23:36.000Z","size":2204,"stargazers_count":1329,"open_issues_count":9,"forks_count":50,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-01T07:26:57.438Z","etag":null,"topics":["coc","coc-extensions","pyright","python"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fannheyward.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"fannheyward","patreon":"fannheyward"}},"created_at":"2019-09-05T07:43:00.000Z","updated_at":"2025-05-01T06:23:33.000Z","dependencies_parsed_at":"2023-10-17T07:13:03.789Z","dependency_job_id":"52f6951c-a906-4dd3-95b2-4e753e1c0e19","html_url":"https://github.com/fannheyward/coc-pyright","commit_stats":{"total_commits":1178,"total_committers":19,"mean_commits":62.0,"dds":0.4864176570458404,"last_synced_commit":"1057da35b95b1e97fe14ecc1e846b2252379e683"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fannheyward%2Fcoc-pyright","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fannheyward%2Fcoc-pyright/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fannheyward%2Fcoc-pyright/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fannheyward%2Fcoc-pyright/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fannheyward","download_url":"https://codeload.github.com/fannheyward/coc-pyright/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254041936,"owners_count":22004807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coc","coc-extensions","pyright","python"],"created_at":"2024-07-31T16:02:14.177Z","updated_at":"2025-05-13T23:08:55.179Z","avatar_url":"https://github.com/fannheyward.png","language":"TypeScript","funding_links":["https://github.com/sponsors/fannheyward","https://patreon.com/fannheyward","https://paypal.me/fannheyward"],"categories":["TypeScript","Language Support","Plugins / Themes / Dependencies"],"sub_categories":[],"readme":"# coc-pyright\n\n\u003c!-- markdownlint-disable no-inline-html --\u003e\n\n\u003ca href=\"https://github.com/sponsors/fannheyward\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/345274/133218454-014a4101-b36a-48c6-a1f6-342881974938.png\" alt=\"GitHub Sponsors\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://patreon.com/fannheyward\"\u003e\u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" alt=\"Patreon donate button\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://paypal.me/fannheyward\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/345274/104303610-41149f00-5505-11eb-88b2-5a95c53187b4.png\" alt=\"PayPal donate button\" /\u003e\u003c/a\u003e\n\n[Pyright](https://github.com/microsoft/pyright) extension for coc.nvim, with additional features:\n\n- semanticTokens highlighting!\n- inlayHints supports\n- codeActions to add imports, ignore typing check, run tests and more\n- linting with `bandit`, `flake8`, `mypy`, `ruff`, `prospector`, `pycodestyle`, `pydocstyle`, `pyflakes`, `pylama`, `pylint`, `pytype`\n- formatting with `ruff`, `yapf`, `black`, `autopep8`, `darker`, `blackd`, `pyink`\n- testing with `unittest` or `pytest`, supports codeLens\n- sort imports with `ruff`, `isort` and `pyright`\n- extract method and variables with `rope`\n\n\u003c!-- markdownlint-disable-next-line --\u003e\n\u003cimg width=\"1173\" alt=\"image\" src=\"https://github.com/fannheyward/coc-pyright/assets/345274/eb1230ec-26d0-4c2f-9b13-d6462e064559\"\u003e\n\n## Install\n\n`:CocInstall coc-pyright`\n\nNote: Pyright may not work as expected if can't detect _project root_ correctly, check [#521](https://github.com/fannheyward/coc-pyright/issues/521#issuecomment-858530052) and [Using workspaceFolders](https://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders#resolve-workspace-folder) in coc.nvim.\n\n## Commands\n\n- `python.runLinting`: Run linting\n- `python.sortImports`: Sort imports by `isort` or `ruff`\n- `pyright.version`: Show the currently used Pyright version\n- `pyright.organizeimports`: Organize imports by Pyright\n- `pyright.restartserver`: This command forces the type checker to discard all of its cached type information and restart analysis. It is useful in cases where new type stubs or libraries have been installed.\n- `pyright.createtypestub`: Creates Type Stubs with given module name, for example `:CocCommand pyright.createtypestub numpy`\n- `pyright.fileTest`: Run test for current test file\n- `pyright.singleTest`: Run test for single nearest test\n\n## Configurations\n\nThese configurations are used by `coc-pyright`, you need to set them in your `coc-settings.json`.\n\n| Configuration                               | Description                                                         | Default       |\n| ------------------------------------------- | ------------------------------------------------------------------- | ------------- |\n| pyright.enable                              | Enable coc-pyright extension                                        | true          |\n| python.analysis.autoImportCompletions       | Determines whether pyright offers auto-import completions           | true          |\n| python.analysis.autoSearchPaths             | Automatically add common search paths like 'src'                    | true          |\n| python.analysis.diagnosticMode              | Analyzes and reports errors for open only or all files in workspace | openFilesOnly |\n| python.analysis.stubPath                    | Path to directory containing custom type stub files                 | typings       |\n| python.analysis.typeshedPaths               | Paths to look for typeshed modules                                  | []            |\n| python.analysis.diagnosticSeverityOverrides | Override the severity levels for individual diagnostics             | {}            |\n| python.analysis.typeCheckingMode            | Defines the default rule set for type checking                      | basic         |\n| python.analysis.useLibraryCodeForTypes      | Use library implementations to extract type information             | true          |\n| python.pythonPath                           | Path to Python                                                      | python        |\n| python.venvPath                             | Path to folder with a list of Virtual Environments                  | \"\"            |\n| python.formatting.provider                  | Provider for formatting                                             | autopep8      |\n| python.formatting.blackPath                 | Custom path to black                                                | black         |\n| python.formatting.blackArgs                 | Arguments passed to black                                           | []            |\n| python.formatting.darkerPath                | Custom path to darker                                               | darker         |\n| python.formatting.darkerArgs                | Arguments passed to darker                                          | []            |\n| python.formatting.pyinkPath                 | Custom path to pyink                                                | pyink         |\n| python.formatting.pyinkArgs                 | Arguments passed to pyink                                           | []            |\n| python.formatting.blackdPath                | Custom path to blackd                                               | blackd        |\n| python.formatting.blackdHTTPURL             | Custom blackd server url                                            | \"\"            |\n| python.formatting.blackdHTTPHeaders         | Custom blackd request headers                                       | {}            |\n| python.formatting.yapfPath                  | Custom path to yapf                                                 | yapf          |\n| python.formatting.yapfArgs                  | Arguments passed to yapf                                            | []            |\n| python.formatting.autopep8Path              | Custom path to autopep8                                             | autopep8      |\n| python.formatting.autopep8Args              | Arguments passed to autopep8                                        | []            |\n| python.linting.enabled                      | Whether to lint Python files with external linters                  | true          |\n| python.linting.flake8Enabled                | Whether to lint with flake8                                         | false         |\n| python.linting.banditEnabled                | Whether to lint with bandit                                         | false         |\n| python.linting.mypyEnabled                  | Whether to lint with mypy                                           | false         |\n| python.linting.ruffEnabled                  | Whether to lint with ruff                                           | false         |\n| python.linting.pytypeEnabled                | Whether to lint with pytype                                         | false         |\n| python.linting.pycodestyleEnabled           | Whether to lint with pycodestyle                                    | false         |\n| python.linting.prospectorEnabled            | Whether to lint with prospector                                     | false         |\n| python.linting.pydocstyleEnabled            | Whether to lint with pydocstyle                                     | false         |\n| python.linting.pylamaEnabled                | Whether to lint with pylama                                         | false         |\n| python.linting.pylintEnabled                | Whether to lint with pylint                                         | false         |\n| python.linting.pyflakesEnabled              | Whether to lint with pyflakes                                       | false         |\n| python.sortImports.path                     | Path to isort script, default using inner version                   | ''            |\n| python.sortImports.args                     | Arguments passed to isort                                           | []            |\n| pyright.server                              | Custom `pyright-langserver` path                                    | ''            |\n| pyright.disableCompletion                   | Disable completion from Pyright                                     | false         |\n| pyright.disableDiagnostics                  | Disable diagnostics from Pyright                                    | false         |\n| pyright.disableDocumentation                | Disable hover documentation from Pyright                            | false         |\n| pyright.disableProgressNotifications        | Disable the initialization and workdone progress notifications      | false         |\n| pyright.completion.importSupport            | Enable `python-import` completion source support                    | true          |\n| pyright.completion.snippetSupport           | Enable completion snippets support                                  | true          |\n| pyright.organizeimports.provider            | Organize imports provider, `pyright`, `ruff` or `isort`             | pyright       |\n| pyright.inlayHints.functionReturnTypes      | Enable inlay hints for function return types                        | true          |\n| pyright.inlayHints.variableTypes            | Enable inlay hints for variable types                               | true          |\n| pyright.inlayHints.parameterTypes           | Enable inlay hints for parameter types                              | true          |\n| pyright.testing.provider                    | Provider for testing, supports `unittest` and `pytest`              | unittest      |\n| pyright.testing.unittestArgs                | Arguments passed to unittest                                        | []            |\n| pyright.testing.pytestArgs                  | Arguments passed to pytest                                          | []            |\n\nAdditional configuration options can be found in [package.json](./package.json).\n\n## pyrightconfig.json\n\nPyright supports [pyrightconfig.json](https://github.com/microsoft/pyright/blob/master/docs/configuration.md) that provide granular control over settings.\n\n## Python typing and stub files\n\nTo provide best experience, Pyright requires packages to be type annotated\nand/or have stub files. The Python community is currently in a transition phase\nwhere package authors are actively looking to provide that. Meanwhile, stub\nfiles for well-known packages may also be obtained from 3rd party, for example:\n\n- [Awesome Python Typing # stub-packages](https://github.com/typeddjango/awesome-python-typing#stub-packages)\n- [typeshed](https://github.com/python/typeshed)\n- [python-type-stubs](https://github.com/microsoft/python-type-stubs)\n\n## Conda setup\n\n1. Create the following file:\n\n   ```sh\n   #!/bin/bash\n   python \"$@\"\n   ```\n\n2. Make it executable: `chmod +x $path`\n3. Set `python.pythonPath` in your `coc-settings.json`: `\"python.pythonPath\": \"\u003cPUT PATH HERE\u003e\"`\n4. Activate the environment before starting vim\n\nThis way python from your currently activated environment will be used\n\n## My Workflow with Pyright\n\n1. create venv in project: `python3 -m venv .venv`\n2. `source .venv/bin/activate`\n3. install modules with pip and work with Pyright\n4. `deactivate`\n\n## License\n\nMIT\n\n---\n\n\u003e This extension is built with [create-coc-extension](https://github.com/fannheyward/create-coc-extension)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffannheyward%2Fcoc-pyright","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffannheyward%2Fcoc-pyright","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffannheyward%2Fcoc-pyright/lists"}