Tabbymacs is an Emacs minor mode that brings Tabby AI inline completions into your editor. It displays completions as ghost text, similar to GitHub Copilot, but is powered by Tabby - an open-source, self-hosted AI coding assistant.
- Inline (ghost text) completions at point
- Automatic or manual triggering of completions
- Accept or dismiss suggestions with simple key bindings
- Suggestions disappear automatically when you keep typing
- Efficient incremental sync with
tabby-agent
via JSON-RPC - Lightweight LSP client design with inline completion support (approach recommended by Tabby team)
- Emacs 27.1+
- Tabby Server: The backend LLM server, please refer to this documentation
- Tabby Agent (LSP server): Requires Node.js version v18.0+ and tabby-agent installed (
npm install --global tabby-agent
)- Remember to configure Tabby Agent according to documentation
Clone this repo and add it to your load-path
:
(add-to-list 'load-path "/path/to/tabbymacs")
(require 'tabbymacs)
;;Example configuration
(use-package tabbymacs
:load-path "/path/to/tabbymacs"
:init
(setq tabbymacs-inline-completion-idle-time 0.6)
(setq tabbymacs-log-level :debug)
:hook (prog-mode . tabbymacs-mode))
Enable tabbymacs-mode
in a buffer: M-x tabbymacs-mode
.
If everything is working, ghost text suggestions will appear while you type.
Command | Key | Description |
---|---|---|
tabbymacs-accept-ghost-text | <tab> or C-<return> | Accept current completion |
tabbymacs-cancel-ghost-text | <escape> or C-g | Dismiss current completion |
tabbymacs-invoked-inline-completion | C-c / | Request completion manually |
Typing also dismisses the current suggestion.
tabbymacs-auto-trigger
(default:t
)- Set it to
nil
for manual-only triggering.
- Set it to
tabbymacs-log-level
(default::info
)- Controls verbosity of Tabbymacs logging. Options:
:debug
,:info
,:warning
,:error
.
- Controls verbosity of Tabbymacs logging. Options:
tabbymacs-inline-completion-idle-time
(default:1.0
)- Defines time in seconds to wait before automatically requesting completion
tabbymacs-send-changes-idle-time
(default:0.5
)- Defines time in seconds to wait before sending changes notification to tabby-agent