You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> This plugin is in early alpha development stage. Features may be incomplete,
5
-
> unstable, or change without notice. While basic functionality is available,
6
-
> you may encounter bugs, performance issues, or unexpected behavior. Current
7
-
> platform support is limited to MacOS and Linux, with Windows to be added at a
8
-
> later date.
3
+
## A Quick Tour
4
+
5
+
Augment's Vim/Neovim plugin provides inline code completions and multi-turn
6
+
chat conversations specially tailored to your codebase. The plugin is designed
7
+
to work with any modern Vim or Neovim setup, and features the same underlying
8
+
context engine that powers our VSCode and IntelliJ plugins.
9
+
10
+
Once you've installed the plugin, tell Augment about your project by adding
11
+
[workspace folders](#workspace-folders) to your config file, and then sign-in
12
+
to the Augment service. You can now open a source file in your project, begin
13
+
typing, and you should receive context-aware code completions. Use tab to
14
+
accept a suggestion, or keep typing to refine the suggestions. To ask questions
15
+
about your codebase or request specific changes, use the `:Augment chat` command
16
+
to start a chat conversation.
9
17
10
18
## Installation
11
19
@@ -48,6 +56,8 @@
48
56
{ 'augmentcode/augment.vim' },
49
57
```
50
58
59
+
1. Add workspace folders to your config file. This is really essential to getting the most out of augment! See the [Workspace Folders](#workspace-folders) section for more information.
60
+
51
61
1. Open Vim and sign in to Augment with the `:Augment signin` command.
52
62
53
63
## Basic Usage
@@ -69,10 +79,53 @@ The following commands are provided:
69
79
:Augment chat-toggle " Toggle the chat panel visibility
70
80
```
71
81
82
+
## Workspace Folders
83
+
84
+
Workspace folders help Augment understand your codebase better by providing
85
+
additional context. Adding your project's root directory as a workspace folder
86
+
allows Augment to take advantage of context from across your project, rather
87
+
than just the currently open file, improving the accuracy and style of
88
+
completions and chat.
89
+
90
+
You can configure workspace folders by setting
91
+
`g:augment_workspace_folders` in your vimrc:
92
+
93
+
```vim
94
+
let g:augment_workspace_folders = ['/path/to/project', '~/another-project']
95
+
```
96
+
97
+
Workspace folders can be specified using absolute paths or paths relative to
98
+
your home directory (~). Adding your project's root directory as a workspace
99
+
folder helps Augment generate completions that match your codebase's patterns
100
+
and conventions.
101
+
102
+
Note: This option must be set before the plugin is loaded.
103
+
104
+
After adding a workspace folder and restarting vim, the output of the
105
+
`:Augment status` command will include the syncing progress for the added
106
+
folder.
107
+
108
+
If you want to ignore particular files or directories from your workspace, you
109
+
can create a `.augmentignore` file in the root of your workspace folder. This
110
+
file is treated similar to a `.gitignore` file. For example, to ignore all
111
+
files within the `node_modules` directory, you can add
112
+
the following lines to your `.augmentignore` file:
113
+
114
+
```
115
+
node_modules/
116
+
```
117
+
118
+
For more information on how to use the `.augmentignore` file, see the [documentation](https://docs.augmentcode.com/setup-augment/sync).
119
+
120
+
72
121
## Chat
73
122
74
-
The chat command allows you to interact with Augment AI in a conversational
75
-
manner. You can use it in two ways:
123
+
Augment chat supports multi-turn conversations using your project's full
124
+
context. Once a conversation is started, subsequent chat exchanges will include
125
+
the history from the previous exchanges. This is useful for asking follow-up
126
+
questions or getting context-specific help.
127
+
128
+
You can interact with chat in two ways:
76
129
77
130
1. Direct command with message:
78
131
@@ -86,32 +139,20 @@ manner. You can use it in two ways:
86
139
87
140
- Type `:Augment chat` followed by your question about the selection
88
141
89
-
The response will appear in a new buffer with markdown formatting. Note that
90
-
chat is currently limited to single-turn conversations - each chat command
91
-
starts a new conversation.
92
-
93
-
## Workspace Folders
142
+
The response will appear in a separate chat buffer with markdown formatting.
94
143
95
-
Workspace folders help Augment understand your codebase better by providing
96
-
additional context. You can configure workspace folders by setting
97
-
`g:augment_workspace_folders`in your vimrc:
98
-
99
-
```vim
100
-
let g:augment_workspace_folders = ['/path/to/project', '~/another-project']
101
-
```
102
-
103
-
Workspace folders can be specified using absolute paths or paths relative to
104
-
your home directory (~). Adding your project's root directory as a workspace
105
-
folder helps Augment generate completions that match your codebase's patterns
106
-
and conventions.
144
+
To start a new conversation, use the `:Augment chat-new` command. This will
145
+
clear the chat history from your context.
107
146
108
-
Note: This option must be set before the plugin is loaded.
147
+
Use the `:Augment chat-toggle`command to open and close the chat panel. When
148
+
the chat panel is closed, the chat conversation will be preserved and can be
149
+
reopened with the same command.
109
150
110
151
## Alternate Keybinds
111
152
112
153
By default, tab is used to accept a suggestion. If you want to use a
113
154
different key, create a mapping that calls `augment#Accept()`. The function
114
-
takes an optional arugment used to specify the fallback text to insert if no
155
+
takes an optional argument used to specify the fallback text to insert if no
115
156
suggestion is available.
116
157
117
158
```vim
@@ -131,6 +172,42 @@ overridden depending on the order in which the plugins are loaded. If tab isn't
131
172
working for you, the `imap <tab>` command can be used to check if the mapping is
132
173
present.
133
174
175
+
## FAQ
176
+
177
+
**Q: I'm not seeing any completions. Is the plugin working?**
178
+
179
+
A: You may want to first check the output of the `:Augment status` command.
180
+
This command will show the current status of the plugin, including whether
181
+
you're signed in and whether your workspace folders are synced. If you're not
182
+
signed in, you'll need to sign in using the `:Augment signin` command. If those
183
+
are not indicating a problem, you can check the plugin log using the `:Augment
184
+
log` command. This will show any errors that may have occurred.
185
+
186
+
**Q: Can I create shortcuts for the Augment commands?**
187
+
188
+
A: Absolutely! You can create mappings for any of the Augment commands. For
189
+
example, to create a shortcut for the `:Augment chat*` commands, you can add the
190
+
following to your vimrc:
191
+
192
+
```vim
193
+
nnoremap <leader>ac :Augment chat<CR>
194
+
vnoremap <leader>ac :Augment chat<CR>
195
+
nnoremap <leader>an :Augment chat-new<CR>
196
+
nnoremap <leader>at :Augment chat-toggle<CR>
197
+
```
198
+
199
+
**Q: My workspace is taking a long time to sync. What should I do?**
200
+
201
+
A: It may take a while to sync if you have a very large codebase that has not
202
+
been synced before. It's also not uncommon to inadvertenly include a large
203
+
directory like `node_modules/`. You can use `:Augment status` to see the
204
+
progress of the sync. If the sync is making progress but just slow, it may be
205
+
worth checking if you have a large directory that you don't need to sync. You
206
+
can add these directories to your `.augmentignore` file to exclude it from the
207
+
sync. If you're still having trouble, please file a github issue with a
208
+
description of the problem and include the output of `:Augment log`.
let warning_message =printf('Your plugin version %s is lower than the latest %s version %s. Please update your plugin to receive the latest features and bug fixes.',
206
+
let warning_message =printf('Your plugin version v%s is lower than the latest %s version v%s. Please update your plugin to receive the latest features and bug fixes.',
0 commit comments