Skip to content

What is the 'key' attribute of Vscode.TextEditorDecorationType.create? #1372

Closed Answered by mnxn
aqjune asked this question in Q&A
Discussion options

You must be logged in to vote

You can reference the official VS Code API documentation: https://code.visualstudio.com/api/references/vscode-api

The documentation for TextEditorDecorationType says that key is the "Internal representation of the handle."
More importantly, it says the following:

To get an instance of a TextEditorDecorationType use createTextEditorDecorationType.

That means you don't have to set the key value yourself. However, since we don't have bindings for the createTextEditorDecorationType function yet, that means you will have to add the binding yourself (inside the Window module). That function has a parameter of type DecorationRenderOptions that also needs bindings.

If it's helpful, I found a Ty…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by aqjune
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants