Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
Created November 12, 2019 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnlindquist/ebeca68a0d2580038930d867b0041b81 to your computer and use it in GitHub Desktop.
Save johnlindquist/ebeca68a0d2580038930d867b0041b81 to your computer and use it in GitHub Desktop.
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext) {
const decoration = vscode.window.createTextEditorDecorationType({
color: 'rgba(0, 0, 0, 0)',
before: {
contentText: '🙈'
},
after: {
contentText: '🙈'
}
});
const editor = vscode.window.activeTextEditor;
if (editor) {
const start = editor.document.positionAt(0);
const end = editor.document.positionAt(10);
editor.setDecorations(decoration, [
{
range: new vscode.Range(start, end),
hoverMessage: 'Hello world!'
}
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment