Update README.md
This commit is contained in:
parent
06309f23ef
commit
9bc6b4d25c
132
README.md
132
README.md
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
**avante.nvim** is a Neovim plugin designed to emulate the behavior of the [Cursor](https://www.cursor.com) AI IDE, providing users with AI-driven code suggestions and the ability to apply these recommendations directly to their source files with minimal effort.
|
**avante.nvim** is a Neovim plugin designed to emulate the behavior of the [Cursor](https://www.cursor.com) AI IDE, providing users with AI-driven code suggestions and the ability to apply these recommendations directly to their source files with minimal effort.
|
||||||
|
|
||||||
⚠️⚠️ **WARNING: This plugin is still in a very early stage of development, so please be aware that the current code is very messy and unstable, and problems are likely to occur.**
|
> [!NOTE]
|
||||||
|
> ⚠️⚠️ This plugin is still in a very early stage of development, so please be aware that the current code is very messy and unstable, and problems are likely to occur.
|
||||||
|
|
||||||
https://github.com/user-attachments/assets/510e6270-b6cf-459d-9a2f-15b397d1fe53
|
https://github.com/user-attachments/assets/510e6270-b6cf-459d-9a2f-15b397d1fe53
|
||||||
|
|
||||||
@ -13,72 +14,79 @@ https://github.com/user-attachments/assets/510e6270-b6cf-459d-9a2f-15b397d1fe53
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Install `avante.nvim` using [lazy.nvim](https://github.com/folke/lazy.nvim):
|
1. Install `tiktoken_core` (Optional):
|
||||||
|
|
||||||
```lua
|
- tiktoken_core: `sudo luarocks install --lua-version 5.1 tiktoken_core`. Alternatively, download a pre-built binary from [lua-tiktoken releases](https://github.com/gptlang/lua-tiktoken/releases)
|
||||||
{
|
- You can check your Lua PATH in Neovim by doing `:lua print(package.cpath)`. Save the binary as `tiktoken_core.so` in any of the given paths.
|
||||||
"yetone/avante.nvim",
|
|
||||||
event = "VeryLazy",
|
> For Arch Linux user, you can install [`luajit-tiktoken-bin`](https://aur.archlinux.org/packages/luajit-tiktoken-bin) or [`lua51-tiktoken-bin`](https://aur.archlinux.org/packages/lua51-tiktoken-bin) from aur!
|
||||||
config = function()
|
|
||||||
require("avante").setup({})
|
2. Install `avante.nvim` using [lazy.nvim](https://github.com/folke/lazy.nvim):
|
||||||
end,
|
|
||||||
dependencies = {
|
```lua
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
{
|
{
|
||||||
"grapp-dev/nui-components.nvim",
|
"yetone/avante.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("avante").setup({})
|
||||||
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"MunifTanjim/nui.nvim"
|
"nvim-tree/nvim-web-devicons",
|
||||||
}
|
{
|
||||||
},
|
"grapp-dev/nui-components.nvim",
|
||||||
"nvim-lua/plenary.nvim",
|
dependencies = {
|
||||||
"MeanderingProgrammer/render-markdown.nvim",
|
"MunifTanjim/nui.nvim"
|
||||||
},
|
}
|
||||||
}
|
},
|
||||||
```
|
"nvim-lua/plenary.nvim",
|
||||||
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Default setup configuration:
|
3. Default setup configuration:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
{
|
{
|
||||||
provider = "claude", -- "claude" or "openai" or "azure"
|
provider = "claude", -- "claude" or "openai" or "azure"
|
||||||
openai = {
|
openai = {
|
||||||
endpoint = "https://api.openai.com",
|
endpoint = "https://api.openai.com",
|
||||||
model = "gpt-4o",
|
model = "gpt-4o",
|
||||||
temperature = 0,
|
temperature = 0,
|
||||||
max_tokens = 4096,
|
max_tokens = 4096,
|
||||||
},
|
},
|
||||||
azure = {
|
azure = {
|
||||||
endpoint = "", -- Example: "https://<your-resource-name>.openai.azure.com"
|
endpoint = "", -- Example: "https://<your-resource-name>.openai.azure.com"
|
||||||
deployment = "", -- Azure deployment name (e.g., "gpt-4o", "my-gpt-4o-deployment")
|
deployment = "", -- Azure deployment name (e.g., "gpt-4o", "my-gpt-4o-deployment")
|
||||||
api_version = "2024-05-13",
|
api_version = "2024-05-13",
|
||||||
temperature = 0,
|
temperature = 0,
|
||||||
max_tokens = 4096,
|
max_tokens = 4096,
|
||||||
},
|
},
|
||||||
claude = {
|
claude = {
|
||||||
endpoint = "https://api.anthropic.com",
|
endpoint = "https://api.anthropic.com",
|
||||||
model = "claude-3-5-sonnet-20240620",
|
model = "claude-3-5-sonnet-20240620",
|
||||||
temperature = 0,
|
temperature = 0,
|
||||||
max_tokens = 4096,
|
max_tokens = 4096,
|
||||||
},
|
},
|
||||||
highlights = {
|
highlights = {
|
||||||
diff = {
|
diff = {
|
||||||
incoming = "DiffAdded", -- need have background color
|
incoming = "DiffAdded", -- need have background color
|
||||||
current = "DiffRemoved", -- need have background color
|
current = "DiffRemoved", -- need have background color
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mappings = {
|
mappings = {
|
||||||
show_sidebar = "<leader>aa",
|
show_sidebar = "<leader>aa",
|
||||||
diff = {
|
diff = {
|
||||||
ours = "co",
|
ours = "co",
|
||||||
theirs = "ct",
|
theirs = "ct",
|
||||||
none = "c0",
|
none = "c0",
|
||||||
both = "cb",
|
both = "cb",
|
||||||
next = "]x",
|
next = "]x",
|
||||||
prev = "[x",
|
prev = "[x",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user