Home > Software design >  Visual Studio Code Extension Development: How can I display code inside my extension view?
Visual Studio Code Extension Development: How can I display code inside my extension view?

Time:11-27

I am developing a visual studio code extension. In my extension view, I need the ability to show code in an editor view from the local disk. If this is not possible then I would like the ability to open local code in a side panel along side my extension view.

Is this possible because when I browse their documentation there's no mention of displaying local code from extension view.

CodePudding user response:

You are looking for this workspace API:

workspace.openTextDocument(fileName).then((document) => {
    window.showTextDocument(document, 0, false));
}
  • Related