Skip to content

feat: teach vibe the editor APIs and keep a bad segment from crashing - #21

Merged
nooga merged 1 commit into
mainfrom
feat/vibe-editor-scripting
Sep 19, 2026
Merged

nooga merged 1 commit into
mainfrom
feat/vibe-editor-scripting

Conversation

@nooga

@nooga nooga commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Teach vibe the live editor scripting surface (keymap, modeline, theme, modes, buffer, minibuffer) so (vibe "clock on the modeline") can emit register-modeline-segment! / bind-key! / set-theme! instead of inventing Clojure.
  • A throwing or non-string modeline segment becomes a red id! badge instead of taking down the frame (the usual (string/trim (os/sh ...)) mistake — os/sh returns a map).
  • C-c C-e / *repl* eval form-by-form in the current *ns* like C-x C-e, so lg-isms such as (now) resolve in *scratch* (let-go's load-string compiles in clojure.core, which does not refer let-go.core). Echo-area tabs render as spaces, not ^I.

Test plan

  • (vibe "clock on the modeline") in *scratch*, C-c C-v, then C-c C-e — clock appears; no Can't resolve now
  • Eval a bad segment (string/trim (os/sh "date" "+%H:%M")) — bar shows clock!, editor stays up
  • Force a nested compile error — echo area shows indented caused by, not ^I
  • lg test/run.lg

Made with Cursor

Vibe's catalog only listed stdlib, so a modeline clock came out as
(string/trim (os/sh ...)) or (now) that C-c C-e couldn't resolve.
The catalog now includes the live scripting surface; throwing segments
become a badge; eval-buffer runs in the current ns like C-x C-e.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nooga
nooga merged commit bffa0cc into main Sep 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant