- Emacs Lisp 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| AGENTS.md | ||
| Eask | ||
| goose-mode.el | ||
| LICENSE | ||
| README.md | ||
| ROADMAP.md | ||
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.