Skip to content

Commit d1fc087

Browse files
authored
Merge pull request #27 from kerma/patch-2
add installation instructions for vim-plug users
2 parents 793fcea + 21108a8 commit d1fc087

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

README.md

+22-5
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@ magenta.nvim is a plugin for leveraging LLM agents in neovim. Think cursor-compo
77
Rather than writing complex code to compress your repo and send it to the LLM (like a repomap, etc...), magenta is built around the idea that the LLM can ask for what it needs to via tools.
88
Flagship models will continue to get better at tools use, and as this happens, the gap between tools like magenta and other agentic tools will grow smaller.
99

10-
# Installation (lazy.nvim)
10+
# Installation
1111

1212
Make sure you have [node](https://nodejs.org/en/download) installed, at least `v20`:
1313

1414
```
1515
node --version
1616
```
1717

18+
The plugin will look for configuration for providers in the following env variables:
19+
20+
- anthropic: ANTHROPIC_API_KEY
21+
- openai: OPENAI_API_KEY, OPENAI_BASE_URL
22+
23+
## Using lazy.nvim
24+
1825
```lua
1926
{
2027
"dlants/magenta.nvim",
@@ -24,10 +31,20 @@ node --version
2431
},
2532
```
2633

27-
The plugin will look for configuration for providers in the following env variables:
34+
## Using vim-plug
2835

29-
- anthropic: ANTHROPIC_API_KEY
30-
- openai: OPENAI_API_KEY, OPENAI_BASE_URL
36+
```lua
37+
local vim = vim
38+
local Plug = vim.fn['plug#']
39+
40+
vim.call('plug#begin')
41+
Plug('dlants/magenta.vim', {
42+
['do'] = 'bun install --frozen-lockfile',
43+
})
44+
vim.call('plug#end')
45+
46+
require('magenta').setup()
47+
```
3148

3249
# Usage
3350

@@ -43,7 +60,7 @@ TLDR:
4360

4461
- `<leader>mt` is for `:Magenta toggle`, will toggle the sidebar on and off.
4562
- `<leader>mp` is for `:Magenta paste-selection`. In visual mode it will take the current selection and paste it into the input buffer.
46-
- `<leader>mc` is for `:Magenta context-files` with your _current_ file. It will pin the current file to your context.
63+
- `<leader>mb` is for `:Magenta context-files` with your _current_ file. It will pin the current file to your context.
4764
- `<leader>mf` is for `:Magenta context-files` it allows you to select files via fzf-lua, and will pin those files to your context. This requires that fzf-lua is installed.
4865
- `<leader>mc` is for `:Magenta clear`, which will clear the current chat.
4966
- `<leader>ma` is for `:Magenta abort`, which will abort the current in-flight request.

0 commit comments

Comments
 (0)