Merge pull request #3637 from continuedev/pe/quick-fix-config
feat(VSC): give option to disable quick fix
This commit is contained in:
commit
a520f008e5
2 changed files with 15 additions and 0 deletions
|
|
@ -101,6 +101,11 @@
|
|||
"default": true,
|
||||
"description": "Show inline suggestion to use the Continue keyboard shortcuts (e.g. \"Cmd/Ctrl L to select code, Cmd/Ctrl I to edit\")."
|
||||
},
|
||||
"continue.disableQuickFix": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Disable the quick fix feature."
|
||||
},
|
||||
"continue.enableQuickActions": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { EXTENSION_NAME } from "core/control-plane/env";
|
||||
import * as vscode from "vscode";
|
||||
|
||||
class ContinueQuickFixProvider implements vscode.CodeActionProvider {
|
||||
|
|
@ -42,6 +43,15 @@ class ContinueQuickFixProvider implements vscode.CodeActionProvider {
|
|||
}
|
||||
|
||||
export default function registerQuickFixProvider() {
|
||||
const isDisabled =
|
||||
!!vscode.workspace
|
||||
.getConfiguration(EXTENSION_NAME)
|
||||
.get<boolean>("disableQuickFix") === true;
|
||||
|
||||
if (isDisabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// In your extension's activate function:
|
||||
vscode.languages.registerCodeActionsProvider(
|
||||
{ language: "*" },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue