Goose Mode for Emacs
  • Emacs Lisp 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-11 14:23:33 +01:00
.gitignore Initial commit 2026-11-11 10:20:33 +01:00
AGENTS.md [AGENTS] project description and v1 coding principles 2026-11-11 10:20:39 +01:00
Eask empty goose-mode major mode 2026-11-11 10:37:16 +01:00
goose-mode.el register goose lsp to eglot 2026-11-11 14:23:33 +01:00
LICENSE Initial commit 2026-11-11 10:20:33 +01:00
README.md register goose lsp to eglot 2026-11-11 14:23:33 +01:00
ROADMAP.md [ROADMAP] drop bullet about auto-closing pairs 2026-11-11 13:36:39 +01:00

goose-mode

Goose Mode for Emacs. Loading goose-mode.el and visiting a .goose file gets fast, local syntax highlighting and editing ergonomics (indentation, imenu, defun navigation, hideshow folding), all without requiring any LSP client.

Eglot

With Eglot (built into Emacs since version 29) loaded, goose-mode registers goose lsp as the server for Goose buffers; nothing in goose-mode.el requires or otherwise depends on Eglot, so this has no effect at all if Eglot is never loaded. Starting the server is still up to you, the same way it would be for any other Eglot-supported language:

(add-hook 'goose-mode-hook #'eglot-ensure)

Eglot's own eglot-semantic-tokens-mode, once connected, recolors names by what they resolve to; goose-mode's own highlighting already covers every one of those categories without a server round trip, so the two are redundant together. Turning semantic-tokens highlighting off for Goose specifically, while leaving it alone for every other Eglot-managed language, is the recommended pairing:

(add-hook 'goose-mode-hook (lambda () (eglot-semantic-tokens-mode -1)))

To have a file checked together with everything it imports, rather than on its own, name the project's entry files in goose-eglot-entry-files, set as a directory-local variable (see the Emacs manual's "Directory Variables" node) so each project can name its own:

;; .dir-locals.el, at a project's root
((goose-mode . ((goose-eglot-entry-files . ("/path/to/project/main.goose")))))

goose-mode has no lsp-mode-specific integration: lsp-mode auto-detects major modes by name, and registering goose-mode with it is unexplored territory for now, left for a later decision if it turns out to matter in practice.