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." } }, },