Back to Extensions Directory
Read the complete README
@yaegassy/coc-ruff
yaegassyruff server extension for coc.nvim
Installation CommandVim prompt
:CocInstall @yaegassy/coc-ruff
GitHub owner
yaegassyVersion
v0.8.1npm package
@yaegassy/coc-ruffRequirements
coc ^0.0.80
License
MIT
Repository
GitHubnpm latest published 2025-05-25Registry checked 2026-08-23Registry summary
Published Package Summary
coc-ruff
Ruff Language Server extension for coc.nvim.
Install
CocInstall:
:CocInstall @yaegassy/coc-ruff
scoped packages
e.g. vim-plug:
Plug 'yaegassy/coc-ruff', {'do': 'yarn install --frozen-lockfile'}
Thanks
License
MIT
This extension is built with create-coc-extension
- ruff server extension for coc.nvim
Activation Events
- onLanguage:python
Developer Resources
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for @yaegassy/coc-ruff@0.8.1.
| Command (:CocCommand) | Description |
|---|---|
| ruff.executeAutofix | Fix all auto-fixable problems |
| ruff.executeFormat | Format document |
| ruff.executeOrganizeImports | Format imports |
| ruff.debugInformation | Print debug information (native server only) |
| ruff.showLogs | Show logs |
| ruff.restart | Restart Server |
| ruff.builtin.installServer | Install ruff-lsp |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
ruff.runstring | null
Run Ruff on every keystroke (`onType`) or on save (`onSave`).
Default: null
Raw JSON Schema
{
"enum": [
"onType",
"onSave"
],
"type": [
"string",
null
],
"scope": "window",
"default": null,
"description": "Run Ruff on every keystroke (`onType`) or on save (`onSave`).",
"enumDescriptions": [
"Run Ruff on every keystroke.",
"Run Ruff on save."
]
}ruff.argsarray
Additional command-line arguments to pass to `ruff check`, e.g., `"args": ["--config=/path/to/pyproject.toml"]`. Supports a subset of Ruff's command-line arguments, ignoring those that are required to operate the LSP, like `--force-exclude` and `--verbose`.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Additional command-line arguments to pass to `ruff check`, e.g., `\"args\": [\"--config=/path/to/pyproject.toml\"]`. Supports a subset of Ruff's command-line arguments, ignoring those that are required to operate the LSP, like `--force-exclude` and `--verbose`."
}ruff.patharray
Path to a custom `ruff` executable, e.g., `["/path/to/ruff"]`.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Path to a custom `ruff` executable, e.g., `[\"/path/to/ruff\"]`."
}ruff.enableboolean
Enable coc-ruff extension
Default: true
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable coc-ruff extension"
}ruff.fixAllboolean
Whether to register Ruff as capable of handling `source.fixAll` actions.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Whether to register Ruff as capable of handling `source.fixAll` actions."
}ruff.excludearray
Set paths for the linter and formatter to ignore. See [the documentation](https://docs.astral.sh/ruff/settings/#lint_exclude) for more details. This setting is used only by the native server.
Default: null
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": null,
"description": "Set paths for the linter and formatter to ignore. See [the documentation](https://docs.astral.sh/ruff/settings/#lint_exclude) for more details. This setting is used only by the native server."
}ruff.logFilestring
Path to the log file for the language server.
**This setting is used only by the native server.**
Default: null
Raw JSON Schema
{
"type": "string",
"scope": "window",
"default": null,
"markdownDescription": "Path to the log file for the language server.\n\n**This setting is used only by the native server.**"
}ruff.lint.runstring
Run Ruff on every keystroke (`onType`) or on save (`onSave`).
Default: "onType"
Raw JSON Schema
{
"enum": [
"onType",
"onSave"
],
"type": "string",
"scope": "window",
"default": "onType",
"description": "Run Ruff on every keystroke (`onType`) or on save (`onSave`).",
"enumDescriptions": [
"Run Ruff on every keystroke.",
"Run Ruff on save."
]
}ruff.logLevelstring
Controls the log level of the language server.
**This setting is used only by the native server.**
Default: null
Raw JSON Schema
{
"enum": [
"error",
"warning",
"info",
"debug",
"trace"
],
"type": "string",
"scope": "window",
"default": null,
"markdownDescription": "Controls the log level of the language server.\n\n**This setting is used only by the native server.**"
}ruff.lint.argsarray
Additional command-line arguments to pass to `ruff check`, e.g., `"args": ["--config=/path/to/pyproject.toml"]`. Supports a subset of Ruff's command-line arguments, ignoring those that are required to operate the LSP, like `--force-exclude` and `--verbose`.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Additional command-line arguments to pass to `ruff check`, e.g., `\"args\": [\"--config=/path/to/pyproject.toml\"]`. Supports a subset of Ruff's command-line arguments, ignoring those that are required to operate the LSP, like `--force-exclude` and `--verbose`."
}ruff.lineLengthinteger | null
Set the [line length](https://docs.astral.sh/ruff/settings/#line-length) used by the formatter and linter. Must be greater than 0 and less than or equal to 320. This setting is used only by the native server.
Default: null
Raw JSON Schema
{
"type": [
"integer",
"null"
],
"scope": "resource",
"default": null,
"description": "Set the [line length](https://docs.astral.sh/ruff/settings/#line-length) used by the formatter and linter. Must be greater than 0 and less than or equal to 320. This setting is used only by the native server."
}ruff.serverPathstring
Custom path to the ruff-lsp command. If not set, the `ruff-lsp` command found in the current Python environment or venv environment will be used.
Default: ""
Raw JSON Schema
{
"type": "string",
"default": "",
"description": "Custom path to the ruff-lsp command. If not set, the `ruff-lsp` command found in the current Python environment or venv environment will be used."
}ruff.format.argsarray
Additional command-line arguments to pass to `ruff format`, e.g., `"args": ["--config=/path/to/pyproject.toml"]`. Supports a subset of Ruff's command-line arguments, ignoring those that are required to operate the LSP, like `--force-exclude` and `--verbose`.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"description": "Additional command-line arguments to pass to `ruff format`, e.g., `\"args\": [\"--config=/path/to/pyproject.toml\"]`. Supports a subset of Ruff's command-line arguments, ignoring those that are required to operate the LSP, like `--force-exclude` and `--verbose`."
}ruff.interpreterarray
When set to a path to python executable, extension will use that to launch the server and any subprocess.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "window",
"default": [],
"description": "When set to a path to python executable, extension will use that to launch the server and any subprocess."
}ruff.lint.enableboolean
Whether to enable linting. Set to `false` to use Ruff exclusively as a formatter.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"markdownDescription": "Whether to enable linting. Set to `false` to use Ruff exclusively as a formatter."
}ruff.lint.ignorearray
Set rule codes to disable. See [the documentation](https://docs.astral.sh/ruff/settings/#lint_ignore) for more details. This setting is used only by the native server.
Default: null
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": null,
"description": "Set rule codes to disable. See [the documentation](https://docs.astral.sh/ruff/settings/#lint_ignore) for more details. This setting is used only by the native server."
}ruff.lint.selectarray
Set rule codes to enable. Use `ALL` to enable all rules. See [the documentation](https://docs.astral.sh/ruff/settings/#lint_select) for more details. This setting is used only by the native server.
Default: null
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": null,
"description": "Set rule codes to enable. Use `ALL` to enable all rules. See [the documentation](https://docs.astral.sh/ruff/settings/#lint_select) for more details. This setting is used only by the native server."
}ruff.disableHoverboolean
Disable hover only.
Default: false
Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Disable hover only."
}ruff.lint.previewboolean
Enable [preview mode](https://docs.astral.sh/ruff/settings/#lint_preview) for the linter; enables unstable rules and fixes. This setting is used only by the native server.
Default: null
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": null,
"description": "Enable [preview mode](https://docs.astral.sh/ruff/settings/#lint_preview) for the linter; enables unstable rules and fixes. This setting is used only by the native server."
}ruff.nativeServerboolean
Use the integrated Rust-based language server, available now in Beta.
Default: true
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Use the integrated Rust-based language server, available now in Beta."
}ruff.trace.serverstring
Traces the communication between coc.nvim and the ruff-lsp.
Default: "off"
Raw JSON Schema
{
"enum": [
"off",
"messages",
"verbose"
],
"type": "string",
"default": "off",
"description": "Traces the communication between coc.nvim and the ruff-lsp."
}ruff.autoFixOnSaveboolean
Turns auto fix on save on or off.
Default: false
Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Turns auto fix on save on or off."
}ruff.format.previewboolean
Enable [preview mode](https://docs.astral.sh/ruff/settings/#format_preview) for the formatter; enables unstable formatting. This setting is used only by the native server.
Default: null
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": null,
"description": "Enable [preview mode](https://docs.astral.sh/ruff/settings/#format_preview) for the formatter; enables unstable formatting. This setting is used only by the native server."
}ruff.importStrategystring
Strategy for loading the `ruff` executable. `fromEnvironment` picks up Ruff from the environment, falling back to the bundled version if needed. `useBundled` uses the version bundled with the extension.
Default: "fromEnvironment"
Raw JSON Schema
{
"enum": [
"fromEnvironment",
"useBundled"
],
"type": "string",
"scope": "window",
"default": "fromEnvironment",
"description": "Strategy for loading the `ruff` executable. `fromEnvironment` picks up Ruff from the environment, falling back to the bundled version if needed. `useBundled` uses the version bundled with the extension.",
"enumDescriptions": [
"Use `ruff` from environment, fallback to bundled version only if `ruff` not available in the environment.",
"Always use the bundled version of `ruff`."
]
}ruff.organizeImportsboolean
Whether to register Ruff as capable of handling `source.organizeImports` actions.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Whether to register Ruff as capable of handling `source.organizeImports` actions."
}ruff.nativeBinaryPathstring
Custom path for the `ruff` binary when using the native server. If no value is set, the `ruff` command will be detected from the runtime environment.
Default: ""
Raw JSON Schema
{
"type": "string",
"default": "",
"description": "Custom path for the `ruff` binary when using the native server. If no value is set, the `ruff` command will be detected from the runtime environment."
}ruff.showSyntaxErrorsboolean
Whether to show syntax error diagnostics.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Whether to show syntax error diagnostics."
}ruff.lint.extendSelectarray
Enable additional rule codes on top of existing configuration, instead of overriding it. Use `ALL` to enable all rules. This setting is used only by the native server.
Default: null
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": null,
"description": "Enable additional rule codes on top of existing configuration, instead of overriding it. Use `ALL` to enable all rules. This setting is used only by the native server."
}ruff.showNotificationsstring
Controls when notifications are shown by this extension.
Default: "off"
Raw JSON Schema
{
"enum": [
"off",
"onError",
"onWarning",
"always"
],
"type": "string",
"scope": "machine",
"default": "off",
"enumDescriptions": [
"All notifications are turned off, any errors or warning are still available in the logs.",
"Notifications are shown only in the case of an error.",
"Notifications are shown for errors and warnings.",
"Notifications are show for anything that the server chooses to show."
],
"markdownDescription": "Controls when notifications are shown by this extension."
}ruff.builtin.pythonPathstring
Python 3.x path (Absolute path) to be used for built-in install.
Default: ""
Raw JSON Schema
{
"type": "string",
"default": "",
"description": "Python 3.x path (Absolute path) to be used for built-in install."
}ruff.useDetectRuffCommandboolean
Automatically detects the ruff command in the execution environment and sets `ruff.path`.
Default: true
Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Automatically detects the ruff command in the execution environment and sets `ruff.path`."
}ruff.ignoreStandardLibraryboolean
Whether to ignore files that are inferred to be part of the Python standard library.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"markdownDescription": "Whether to ignore files that are inferred to be part of the Python standard library."
}ruff.configurationPreferencestring
The preferred method of resolving configuration in the editor with local configuration froml `.toml` files. This setting is used only by the native server.
Default: "editorFirst"
Raw JSON Schema
{
"enum": [
"editorFirst",
"filesystemFirst",
"editorOnly"
],
"type": "string",
"scope": "resource",
"default": "editorFirst",
"description": "The preferred method of resolving configuration in the editor with local configuration froml `.toml` files. This setting is used only by the native server.",
"enumDescriptions": [
"The default strategy - configuration set in the editor takes priority over configuration set in `.toml` files.",
"An alternative strategy - configuration set in `.toml` files takes priority over configuration set in the editor.",
"An alternative strategy - configuration set in `.toml` files is ignored entirely."
]
}ruff.disableDocumentFormattingboolean
Disable document formatting only.
Default: false
Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Disable document formatting only."
}ruff.enableExperimentalFormatterboolean
Controls whether Ruff registers as capable of code formatting. The Ruff formatter is in an alpha state during which formatting may change at any time.
Default: false
Raw JSON Schema
{
"type": "boolean",
"scope": "machine",
"default": false,
"markdownDescription": "Controls whether Ruff registers as capable of code formatting. The Ruff formatter is in an alpha state during which formatting may change at any time."
}ruff.codeAction.fixViolation.enableboolean
Whether to display Quick Fix actions to autofix violations.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Whether to display Quick Fix actions to autofix violations."
}ruff.codeAction.disableRuleComment.enableboolean
Whether to display Quick Fix actions to disable rules via `noqa` suppression comments.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Whether to display Quick Fix actions to disable rules via `noqa` suppression comments."
}ruff.client.codeAction.showDocumantaion.enableboolean
Whether to display the code action for open the Ruff rule documentation web page included in the diagnostic information.
Default: false
Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Whether to display the code action for open the Ruff rule documentation web page included in the diagnostic information."
}