Skip to content

yaegassy/coc-pyrefly

Repository files navigation

coc-pyrefly

Pyrefly Language Server extension for coc.nvim.

Usage

To use this coc extension, the pyrefly command must exist in the execution environment.

Install

CocInstall:

:CocInstall @yaegassy/coc-pyrefly

scoped packages

e.g. vim-plug:

Plug 'yaegassy/coc-pyrefly', {'do': 'pnpm install'}

Configuration options

  • pyrefly.enable: Enable coc-pyrefly extension, default: true
  • pyrefly.lspPath: Custom path for the pyrefly binary. If no value is set, the pyrefly command will be detected from the runtime environment, default: ""
  • pyrefly.lspArguments: Additional arguments that should be passed to the binary at pyrefly.lspPath, default: ["lsp"]
  • python.pyrefly.disableLanguageServices: If true, pyrefly will not provide other IDE services like completions, hover, definition, etc. To control type errors, see python.pyrefly.displayTypeErrors, default: false
  • python.pyrefly.displayTypeErrors: If 'default', Pyrefly will only provide type check squiggles in the IDE if your file is covered by a Pyrefly configuration. If 'force-off', Pyrefly will never provide type check squiggles in the IDE. If 'force-on', Pyrefly will always provide type check squiggles in the IDE. If 'error-missing-imports', Pyrefly will only show errors for missing imports and missing sources (missing-import, missing-source, and missing-source-for-stubs), valid option: [default, force-off, force-on, error-missing-imports], default: "default"
  • python.pyrefly.disabledLanguageServices: Disable specific language services. Set individual services to true to disable them, See configuration in package.json
  • python.analysis.showHoverGoToLinks: Controls whether hover tooltips include 'Go to definition' and 'Go to type definition' navigation links, default: true
  • pyrefly.trace.server: Traces the communication between coc.nvim and the pyrefly language server, default: "off"

Commands

  • pyrefly.showLogs: Show logs
  • pyrefly.restartClient: Restart Pyrefly Client

Thanks

License

MIT