micro-editor/micro · warning

Unable to load help text for %s: %v

Error message

Unable to load help text for %s: %v

What it means

Returned by (*BufPane).openHelp (internal/action/command.go:432) when config.FindRuntimeFile(config.RTHelp, page).Data() fails — the help markdown for the requested topic cannot be located or read in any runtime search path. Micro resolves help files from the installed runtime directory (or $MICRO_RUNTIME_PATH / -runtime-path flag); an unknown topic or a broken runtime installation both land here. The underlying error is embedded with %v.

Source

Thrown at internal/action/command.go:432

// ReopenCmd reopens the buffer (reload from disk)
func (h *BufPane) ReopenCmd(args []string) {
	if h.Buf.Modified() {
		InfoBar.YNPrompt("Save file before reopen?", func(yes, canceled bool) {
			if !canceled && yes {
				h.Save()
				h.ReOpen()
			} else if !canceled {
				h.ReOpen()
			}
		})
	} else {
		h.ReOpen()
	}
}

func (h *BufPane) openHelp(page string, hsplit bool, forceSplit bool) error {
	if data, err := config.FindRuntimeFile(config.RTHelp, page).Data(); err != nil {
		return errors.New(fmt.Sprintf("Unable to load help text for %s: %v", page, err))
	} else {
		helpBuffer := buffer.NewBufferFromString(string(data), page+".md", buffer.BTHelp)
		helpBuffer.SetName("Help " + page)
		helpBuffer.SetOptionNative("hltaberrors", false)
		helpBuffer.SetOptionNative("hltrailingws", false)

		if h.Buf.Type == buffer.BTHelp && !forceSplit {
			h.OpenBuffer(helpBuffer)
		} else if hsplit {
			h.HSplitBuf(helpBuffer)
		} else {
			h.VSplitBuf(helpBuffer)
		}
	}
	return nil
}

// HelpCmd tries to open the given help page according to the split type

View on GitHub (pinned to 1c8b82b32e)

Solutions

  1. Check the topic name against the shipped pages: help, colors, keybindings, plugins, options, writing-plugins, ... (Tab-complete in the command bar)
  2. Verify runtime assets exist: ls $(micro -version shows config dir) or locate runtime/help/help.md; if absent, reinstall via the official release or package that ships them
  3. If you overrode runtime lookup, include help/: cp -r /usr/share/micro/runtime/help $MICRO_RUNTIME_PATH/ or unset MICRO_RUNTIME_PATH
  4. Pass '-runtime-path /path/to/runtime' (or fix the env var) when the binary lives apart from its assets

Example fix

// before
> help colorscheem   // Unable to load help text for colorscheem: file does not exist

// after
> help colors
Defensive patterns

Strategy: validation

Validate before calling

// Verify the help topic resolves before opening (public config API)
if config.FindRuntimeFile(config.RTHelp, page) == nil {
    return fmt.Errorf("no help page %q — try 'help', 'keybindings', 'colors', 'plugins'", page)
}
return h.openHelp(page, hsplit, forceSplit)

Try / catch

if err := h.openHelp(page, hsplit, forceSplit); err != nil {
    if strings.HasPrefix(err.Error(), "Unable to load help text") {
        InfoBar.Error(err)        // show in infobar, keep editing
        return                    // non-fatal: do not propagate
    }
    return err
}

Prevention

When it happens

Trigger: Typing > help colorscheem (typo topic) or > help plugins when runtime/help/plugins.md is missing because micro was installed without its runtime files, MICRO_RUNTIME_PATH points at an incomplete directory, or a snap/flatpak package split the runtime assets from the binary.

Common situations: Package-manager installs that omit the 'runtime' tree; users setting MICRO_RUNTIME_PATH for custom colorschemes but forgetting to copy help/; invoking HelpCmd from a Lua plugin with a topic string that has no matching .md file.

Related errors


AI-assisted analysis of micro-editor/micro@1c8b82b32e (2026-08-15). Data as JSON: /api/errors/fa44d1d5eedf18b5. Report an issue: GitHub.