0.0.5 • Published 4 months ago

@vscode-use/treeprovider v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

This library is designed to quickly use the tree data provider in the vscode plugin using sidebar trees to make it easier to use

Install

npm i @vscode-use/treeprovider
import { renderTree } from '@vscode-use/treeprovider'
export function activate(context: vscode.ExtensionContext) {
  const { dispose, update } = renderTree(treeData, 'example1.id')
  vscode.commands.registerCommand('refresh-tree', () => { // Update the tree
    update([
      {
        label: 'label-2',
        collapsed: true,
        children: [
          {
            label: 'label-2-1',
            command: {
              title: 'label-2-1',
              command: 'command-2',
              arguments: ['2-1']
            }
          }
        ]
      },
      {
        label: 'label-3',
        children: [
          {
            label: 'label-3-1',
            command: {
              title: 'label-3-1',
              command: 'command-3',
              arguments: ['3-1']
            }
          }
        ]
      }
    ])
  })
}

example

License

MIT License © 2022 Simon He

0.0.5

4 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.4

8 months ago

0.0.1

11 months ago