Skip to content

[FEATURE REQUEST] Support text editors beyond vim/nvim  #116

@westwater

Description

@westwater

Summary

The NotesPluginConfig.DefaultEditor field documents support for "any $EDITOR value", but the implementation only handles builtin, vim, and nvim. Editors like micro, nano, helix, etc. are silently ignored and fall back to the builtin textarea.

Current Behavior

  1. Config loader gap: rawPluginsConfig in loader.go has no notes field, so plugins.notes.defaultEditor in config.json is never loaded.

  2. Hard-coded vim check: isDefaultEditorVim() in plugin.go only matches "vim" or "nvim" — any other value falls through to the builtin editor with no indication that the config was ignored.

func (p *Plugin) isDefaultEditorVim() bool {
    editor := strings.ToLower(p.ctx.Config.Plugins.Notes.DefaultEditor)
    return editor == "vim" || editor == "nvim"
}

Expected Behavior

Setting defaultEditor to any terminal editor (e.g. micro, nano, helix) should open that editor inline via the tty.Model, the same way vim/nvim are handled today.

Suggested Changes

  1. Add Notes field to rawPluginsConfig in loader.go and wire it through mergeConfig
  2. Generalize the inline editor check — instead of isDefaultEditorVim(), check if DefaultEditor is any non-empty, non-"builtin" value and spawn it via tty
  3. Keep the "builtin" value as the default for the built-in textarea

Use Case

I'd like to use micro as my notes editor. The config struct and its doc comment suggest this should work, but the implementation doesn't support it yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions