Skip to content

Commit

Permalink
feat: add setting for showing linting fixes (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellebore authored Jan 23, 2025
1 parent 7e19b4b commit bc0ae0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@
"default": true,
"description": "Show code lens for Sourcery's coding assistant."
},
"sourcery.suggestFixes": {
"type": "boolean",
"default": true,
"description": "Suggest AI fixes for all problems."
},
"sourcery.ruleType.refactorings": {
"type": "boolean",
"default": true,
Expand Down
4 changes: 4 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ function createLangServer(): LanguageClient {
.getConfiguration("sourcery")
.get<boolean>("codeLens");

const suggestFixes = workspace
.getConfiguration("sourcery")
.get<boolean>("suggestFixes");
const packageJson = extensions.getExtension("sourcery.sourcery").packageJSON;
const extensionVersion = packageJson.version;

Expand Down Expand Up @@ -72,6 +75,7 @@ function createLangServer(): LanguageClient {
extension_version: extensionVersion,
telemetry_enabled: env.isTelemetryEnabled,
show_code_lens: showCodeLens,
suggest_ai_fixes: suggestFixes,
},
};

Expand Down

0 comments on commit bc0ae0b

Please sign in to comment.