From a0a68521e7049495aaa103dd4af5f71f0fe97b1e Mon Sep 17 00:00:00 2001 From: Lucas Alber Date: Mon, 23 Oct 2023 10:00:20 +0200 Subject: [PATCH] Update settings schema for 0.0.41 --- LSP-ruff.sublime-settings | 14 ++++++++++---- sublime-package.json | 21 ++++++++++++++++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/LSP-ruff.sublime-settings b/LSP-ruff.sublime-settings index 3536a79..2027b4a 100644 --- a/LSP-ruff.sublime-settings +++ b/LSP-ruff.sublime-settings @@ -4,11 +4,13 @@ // same as globalSettings }, "globalSettings": { - // Sets the tracing level for the extension. - "logLevel": "error", // Custom arguments passed to ruff. // See ruff documentation at https://github.com/charliermarsh/ruff/blob/main/README.md#configuration - "args": [], + "lint.args": [], + // Run Ruff on every keystroke (onType) or on save (onSave). + "lint.run": "onType", + // Sets the tracing level for the extension. + "logLevel": "error", // Setting to provide custom ruff executables, to try in order. "path": [], // Path to a Python interpreter to use to run the linter server. @@ -18,7 +20,11 @@ // Whether to register Ruff as capable of handling source.organizeImports actions. "organizeImports": true, // Whether to register Ruff as capable of handling source.fixAll actions. - "fixAll": true + "fixAll": true, + // Whether to display Quick Fix actions to autofix violations. + "codeAction.fixViolation.enable": true, + // Whether to display Quick Fix actions to disable rules via noqa suppression comments. + "codeAction.disableRuleComment.enable": true, }, }, "command": [ diff --git a/sublime-package.json b/sublime-package.json index f3148b5..c98cd93 100644 --- a/sublime-package.json +++ b/sublime-package.json @@ -11,11 +11,20 @@ "LspRuffSettings": { "additionalProperties": false, "properties": { - "args": { + "lint.args": { "type": "array", "default": [], "markdownDescription": "Custom arguments passed to ruff. See [ruff documentation](https://github.com/charliermarsh/ruff/blob/main/README.md#configuration)." }, + "lint.run": { + "type": "string", + "default": "onType", + "enum": [ + "onType", + "onSave" + ], + "description": "Run Ruff on every keystroke (onType) or on save (onSave)." + }, "logLevel": { "type": "string", "default": "error", @@ -52,6 +61,16 @@ "type": "boolean", "default": true, "description": "Whether to register Ruff as capable of handling source.fixAll actions." + }, + "codeAction.fixViolation.enable": { + "type": "boolean", + "default": true, + "description": "Whether to display Quick Fix actions to autofix violations." + }, + "codeAction.disableRuleComment.enable": { + "type": "boolean", + "default": true, + "description": "Whether to display Quick Fix actions to disable rules via noqa suppression comments." } }, },