Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add installation instructions for vim-plug users #27

Merged
merged 4 commits into from
Jan 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@ magenta.nvim is a plugin for leveraging LLM agents in neovim. Think cursor-compo
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.
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.

# Installation (lazy.nvim)
# Installation

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

```
node --version
```

The plugin will look for configuration for providers in the following env variables:

- anthropic: ANTHROPIC_API_KEY
- openai: OPENAI_API_KEY, OPENAI_BASE_URL

## Using lazy.nvim

```lua
{
"dlants/magenta.nvim",
Expand All @@ -24,10 +31,20 @@ node --version
},
```

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

- anthropic: ANTHROPIC_API_KEY
- openai: OPENAI_API_KEY, OPENAI_BASE_URL
```lua
local vim = vim
local Plug = vim.fn['plug#']

vim.call('plug#begin')
Plug('dlants/magenta.vim', {
['do'] = 'bun install --frozen-lockfile',
})
vim.call('plug#end')

require('magenta').setup()
```

# Usage

Expand All @@ -43,7 +60,7 @@ TLDR:

- `<leader>mt` is for `:Magenta toggle`, will toggle the sidebar on and off.
- `<leader>mp` is for `:Magenta paste-selection`. In visual mode it will take the current selection and paste it into the input buffer.
- `<leader>mc` is for `:Magenta context-files` with your _current_ file. It will pin the current file to your context.
- `<leader>mb` is for `:Magenta context-files` with your _current_ file. It will pin the current file to your context.
- `<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.
- `<leader>mc` is for `:Magenta clear`, which will clear the current chat.
- `<leader>ma` is for `:Magenta abort`, which will abort the current in-flight request.
Expand Down
Loading