Skip to content
Discussion options

You must be logged in to vote

@StuBramley The naming of the openTextDocument API can be a bit misleading. All that one does is loads the document and gives you access to it as a TextDocument. There is another API to actually show it in the editor:

const doc = await vscode.workspace.openTextDocument(uri);
await vscode.window.showTextDocument(doc);

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@StuBramley
Comment options

@SanjulaGanepola
Comment options

Answer selected by SanjulaGanepola
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