This is an attempt to adapt the lsp-server from Augment's Vim plugin to work in emacs with lsp-mode
What's working:
-
Augment log in and status
-
Chat, including multi-turn and referring to a region of code
-
Completions with company-mode (but see the commit "Rewrite completion responses from Augment so Emacs accepts them")
-
Sign up for a free trial of Augment at augmentcode.com.
-
Install Node.js, version 22.0.0 or newer, which is a required dependency.
-
Install lsp-mode and markdown-mode in emacs
-
Clone this repository somewhere and customize the
lsp-augment-server-scriptvariable to point at thedist/server.jsfile from the repo, either viaM-x customizeand searching for "augment", or by hand:```(custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(lsp-augment-server-script "/path/to/augment.vim.git/dist/server.js")) ``` -
Set up lsp-mode to use lsp-augment, adjusting the load-path as necessary to include this repository:
```(require 'lsp-mode) (add-hook 'emacs-lisp-mode-hook #'lsp) (add-to-list 'load-path "/path/to/augment.vim.git/emacs/") (require 'lsp-augment) (add-to-list 'lsp-language-id-configuration '(emacs-lisp-mode . "augment")) ``` -
Start emacs and log into your Augment account via
M-x lsp-augment-signin
Use M-x lsp-augment-signin to log in and M-x lsp-augment-signout
to log out. You can check the status including the progress of
workspace sync with M-x lsp-augment-status.
Use M-x lsp-augment-chat to chat with Augment; you will be prompted
to enter your chat message. If the region is active then the selected
text will be passed to Augment as part of the chat. The chat history
is kept in a *Augment Chat History* buffer and will be used for
multi-turn conversations.
To clear the history and start a new conversion, use the function M-x lsp-augment-reset-chat.
This repository includes two main components:
- Vim Plugin: This includes all files in the repository except
distfolder. These files are licensed under the MIT License. - Emacs Lisp Client: This is licensed under the same MIT License.
- Server (
distfolder): This file is proprietary and licensed under a Custom Proprietary License.
For details on usage restrictions, refer to the LICENSE.md file.