-
Notifications
You must be signed in to change notification settings - Fork 21
Description
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
-
Config loader gap:
rawPluginsConfiginloader.gohas nonotesfield, soplugins.notes.defaultEditorinconfig.jsonis never loaded. -
Hard-coded vim check:
isDefaultEditorVim()inplugin.goonly 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
- Add
Notesfield torawPluginsConfiginloader.goand wire it throughmergeConfig - Generalize the inline editor check — instead of
isDefaultEditorVim(), check ifDefaultEditoris any non-empty, non-"builtin"value and spawn it via tty - 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
Labels
Projects
Status