Skip to content

emacsmirror/tabbymacs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tabbymacs

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.

Features

  • 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)

Requirements

  • 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)

Installation

Manual

Clone this repo and add it to your load-path:

(add-to-list 'load-path "/path/to/tabbymacs")
(require 'tabbymacs)

Using use-package

;;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))

Usage

Enable tabbymacs-mode in a buffer: M-x tabbymacs-mode.

If everything is working, ghost text suggestions will appear while you type.

Key bindings

CommandKeyDescription
tabbymacs-accept-ghost-text<tab> or C-<return>Accept current completion
tabbymacs-cancel-ghost-text<escape> or C-gDismiss current completion
tabbymacs-invoked-inline-completionC-c /Request completion manually

Typing also dismisses the current suggestion.

Configuration

  • tabbymacs-auto-trigger (default: t)
    • Set it to nil for manual-only triggering.
  • tabbymacs-log-level (default: :info)
    • Controls verbosity of Tabbymacs logging. Options: :debug, :info, :warning, :error.
  • 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

About

Inline AI code completions via Tabby LSP

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Languages

  • Emacs Lisp 100.0%