1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local config = import("micro/config")

-- This file is loaded last (9-) and contains the single init() function
-- that registers all commands from the other modules

function init()
  -- Gutter messages commands
  config.MakeCommand("my-load", loadTestMessages, config.NoComplete)
  config.MakeCommand("my-clear", clearGutterMessages, config.NoComplete)
  config.MakeCommand("my-inspect", showMessageAtCursor, config.NoComplete)

  -- TV integration command
  config.MakeCommand("my-tv", runTvText, config.NoComplete)

  -- File navigation command
  config.MakeCommand("my-goto", goToFile, config.NoComplete)

  -- Git blame command
  config.MakeCommand("my-blame", gitBlame, config.NoComplete)

  -- OpenCode AI agent commands
  config.MakeCommand("my-agent-prev", agentPrevPosition, config.NoComplete)
  config.MakeCommand("my-agent-next", agentNextPosition, config.NoComplete)
  config.MakeCommand("my-agent-send", sendToAgent, config.NoComplete)
  config.MakeCommand("my-agent-reset", agentClearSession, config.NoComplete)
end