如何在Visual Studio代码文本编辑器修饰中应用缓出转换

时间:2016-06-23 15:47:31

标签: visual-studio-code vscode-extensions

如何将缓出转换应用于Visual Studio Code API中的TextEditorDecorationType

var flashDecorationType = vscode.window.createTextEditorDecorationType({
  backgroundColor: 'rgba(100,200,100,0.5)'
});

var range = getCurrentRange();
var decoration = { range: range }
activeEditor.setDecorations(flashDecorationType, [decoration]);

上面的代码应用了装饰,但它是静态的,我希望背景颜色在1秒内消失。这可以在vscode中完成吗?

我希望能够做到这样的事情:

var flashDecorationType = vscode.window.createTextEditorDecorationType({
  backgroundColor: 'rgba(100,200,100,0.5)',
  transition: 'backgroundColor 1s ease-out'
});

0 个答案:

没有答案