diff --git a/extensions/markdown-language-features/src/features/foldingProvider.ts b/extensions/markdown-language-features/src/features/foldingProvider.ts
index 9e98cfd67b3..5d2f5eff35b 100644
--- a/extensions/markdown-language-features/src/features/foldingProvider.ts
+++ b/extensions/markdown-language-features/src/features/foldingProvider.ts
@@ -25,7 +25,7 @@ export default class MarkdownFoldingProvider implements vscode.FoldingRangeProvi
(isStartRegion(token.content) || isEndRegion(token.content));
- const tokens = await this.engine.parse(document);
+ const tokens = await this.enginee.parse(document);
const regionMarkers = tokens.filter(isRegionMarker)
.map(token => ({ line: token.map[0], isStart: isStartRegion(token.content) }));
diff --git a/src/vs/editor/contrib/codeAction/lightBulbWidget.css b/src/vs/editor/contrib/codeAction/lightBulbWidget.css
index 3608547dd98..e496371d9a4 100644
--- a/src/vs/editor/contrib/codeAction/lightBulbWidget.css
+++ b/src/vs/editor/contrib/codeAction/lightBulbWidget.css
@@ -21,7 +21,16 @@
background: url('lightbulb.svg') center center no-repeat;
}
+.monaco-editor.vs .lightbulb-glyph.autofixable {
+ background: url('lightbulb-autofix.svg') center center no-repeat;
+}
+
.monaco-editor.vs-dark .lightbulb-glyph,
.monaco-editor.hc-black .lightbulb-glyph {
background: url('lightbulb-dark.svg') center center no-repeat;
}
+
+.monaco-editor.vs-dark .lightbulb-glyph.autofixable,
+.monaco-editor.hc-black .lightbulb-glyph.autofixable {
+ background: url('lightbulb-autofix-dark.svg') center center no-repeat;
+}
diff --git a/src/vs/editor/contrib/codeAction/lightBulbWidget.ts b/src/vs/editor/contrib/codeAction/lightBulbWidget.ts
index 65dc62e79bc..0507740c3c6 100644
--- a/src/vs/editor/contrib/codeAction/lightBulbWidget.ts
+++ b/src/vs/editor/contrib/codeAction/lightBulbWidget.ts
@@ -12,6 +12,8 @@ import 'vs/css!./lightBulbWidget';
import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser';
import { TextModel } from 'vs/editor/common/model/textModel';
import { CodeActionsState } from './codeActionModel';
+import { CodeAction } from 'vs/editor/common/modes';
+import { CodeActionKind } from 'vs/editor/contrib/codeAction/codeActionTrigger';
export class LightBulbWidget extends Disposable implements IContentWidget {
@@ -127,7 +129,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
const selection = this._state.rangeOrSelection;
this._state.actions.then(fixes => {
if (!token.isCancellationRequested && fixes && fixes.length > 0 && selection) {
- this._show();
+ this._show(fixes);
} else {
this.hide();
}
@@ -144,7 +146,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
return this._domNode.title;
}
- private _show(): void {
+ private _show(codeActions: CodeAction[]): void {
const config = this._editor.getConfiguration();
if (!config.contribInfo.lightbulbEnabled) {
return;
@@ -184,6 +186,7 @@ export class LightBulbWidget extends Disposable implements IContentWidget {
position: { lineNumber: effectiveLineNumber, column: 1 },
preference: LightBulbWidget._posPref
};
+ dom.toggleClass(this._domNode, 'autofixable', codeActions.some(fix => !!fix.kind && CodeActionKind.QuickFix.contains(new CodeActionKind(fix.kind)) && !!fix.isPreferred));
this._editor.layoutContentWidget(this);
}
diff --git a/src/vs/editor/contrib/codeAction/lightbulb-autofix-dark.svg b/src/vs/editor/contrib/codeAction/lightbulb-autofix-dark.svg
new file mode 100644
index 00000000000..40678e79d7d
--- /dev/null
+++ b/src/vs/editor/contrib/codeAction/lightbulb-autofix-dark.svg
@@ -0,0 +1,10 @@
+
diff --git a/src/vs/editor/contrib/codeAction/lightbulb-autofix.svg b/src/vs/editor/contrib/codeAction/lightbulb-autofix.svg
new file mode 100644
index 00000000000..a4b4858e4dc
--- /dev/null
+++ b/src/vs/editor/contrib/codeAction/lightbulb-autofix.svg
@@ -0,0 +1,10 @@
+