← back to marketplace
H

Hello World

A sample starter extension for ted. Registers a command that shows a welcome notification.

versionv1.0.0
authortomlin7
installs0
tags
samplestarternotification
install
ted ext install hello-world

or copy to ~/.ted/extensions/hello-world/

readme

hello world

a minimal starter extension for ted. use this as a template when building your own extensions.

features

  • registers a hello world: show greeting command
  • shows a notification with the active file path (or a welcome message if no file is open)
  • demonstrates the basic activate / deactivate lifecycle

installation

ted ext install hello-world

or manually copy this folder to ~/.ted/extensions/hello-world/.

usage

open the command palette and run hello world: show greeting.

extension api used

apiusage
api.commands.registerregisters the greet command
api.editor.getActiveFilegets the current file path
api.editor.showNotificationdisplays the notification

source

api.commands.register("hello-world.greet", "Hello World: Show Greeting", () => {
  const file = api.editor.getActiveFile();
  api.editor.showNotification(file ? `Active: ${file}` : "Hello from ted!", "info");
});