-
-
Notifications
You must be signed in to change notification settings - Fork 304
feat(completion): added avante-nvim plugin
#1184
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7f2f5b1
add avante plug and readme
vonhyou b98ccba
test and add render-markdown.nvim as recommended
vonhyou 437eedd
fix typo
vonhyou 748d1ba
change to mini.icons
vonhyou 9956b7e
switch to fenced link
vonhyou f269bfc
remove redundant config
vonhyou faad176
add avante cmds
vonhyou b9a8eb5
add keymaps opts that have api impl and documented bindings
vonhyou 295ce86
add keymaps opts that have cmds
vonhyou c754918
Update lua/astrocommunity/completion/avante-nvim/init.lua
vonhyou 14a25ca
Update lua/astrocommunity/completion/avante-nvim/init.lua
vonhyou d9323b8
Update lua/astrocommunity/completion/avante-nvim/README.md
vonhyou 48d17b6
adjust plugin loading and its dependency
vonhyou c8833b8
re-add cmd define
vonhyou 2b2b46d
remove default icon package config
vonhyou eca24bb
remove optional dependency: copilot provider
vonhyou 2cad0e5
remove all optional dependencies
vonhyou a1c7d1e
add configuration of optional plugins
mehalter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Avante.nvim is a Neovim plugin that emulates the Cursor AI IDE's functionality. It provides AI-driven code suggestions and allows users to apply these recommendations directly to their source files with minimal effort. | ||
|
|
||
|
|
||
| > [!IMPORTANT] | ||
| > | ||
| > `avante.nvim` is currently only compatible with Neovim 0.10.1 or later. | ||
|
|
||
| For more information, please refer to: | ||
|
|
||
| Repository: <https://github.com/yetone/avante.nvim> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| return { | ||
| "yetone/avante.nvim", | ||
| build = ":AvanteBuild", | ||
| cmd = { | ||
| "AvanteAsk", | ||
| "AvanteBuild", | ||
| "AvanteConflictChooseAllTheirs", | ||
| "AvanteConflictChooseBase", | ||
| "AvanteConflictChooseBoth", | ||
| "AvanteConflictChooseCursor", | ||
| "AvanteConflictChooseNone", | ||
| "AvanteConflictChooseOurs", | ||
| "AvanteConflictChooseTheirs", | ||
| "AvanteConflictListQf", | ||
| "AvanteConflictNextConflict", | ||
| "AvanteConflictPrevConflict", | ||
| "AvanteEdit", | ||
| "AvanteRefresh", | ||
| "AvanteSwitchProvider", | ||
| }, | ||
vonhyou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| dependencies = { | ||
| "stevearc/dressing.nvim", | ||
| "nvim-lua/plenary.nvim", | ||
| "MunifTanjim/nui.nvim", | ||
| { | ||
| "AstroNvim/astrocore", | ||
| opts = function(_, opts) | ||
| local maps = assert(opts.mappings) | ||
| local prefix = "<Leader>a" | ||
|
|
||
| maps.n[prefix] = { desc = "Avante functionalities" } | ||
|
|
||
| maps.n[prefix .. "a"] = { function() require("avante.api").ask() end, desc = "Avante ask" } | ||
| maps.v[prefix .. "a"] = { function() require("avante.api").ask() end, desc = "Avante ask" } | ||
|
|
||
| maps.v[prefix .. "r"] = { function() require("avante.api").refresh() end, desc = "Avante refresh" } | ||
|
|
||
| maps.n[prefix .. "e"] = { function() require("avante.api").edit() end, desc = "Avante edit" } | ||
| maps.v[prefix .. "e"] = { function() require("avante.api").edit() end, desc = "Avante edit" } | ||
|
|
||
| -- the following key bindings do not have an official api implementation | ||
| maps.n.co = { ":AvanteConflictChooseOurs<CR>", desc = "Choose ours" } | ||
| maps.v.co = { ":AvanteConflictChooseOurs<CR>", desc = "Choose ours" } | ||
|
|
||
| maps.n.ct = { ":AvanteConflictChooseTheirs<CR>", desc = "Choose theirs" } | ||
| maps.v.ct = { ":AvanteConflictChooseTheirs<CR>", desc = "Choose theirs" } | ||
|
|
||
| maps.n.ca = { ":AvanteConflictChooseAllTheirs<CR>", desc = "Choose all theirs" } | ||
| maps.v.ca = { ":AvanteConflictChooseAllTheirs<CR>", desc = "Choose all theirs" } | ||
|
|
||
| maps.n.c0 = { ":AvanteConflictChooseNone<CR>", desc = "Choose none" } | ||
| maps.v.c0 = { ":AvanteConflictChooseNone<CR>", desc = "Choose none" } | ||
|
|
||
| maps.n.cb = { ":AvanteConflictChooseBoth<CR>", desc = "Choose both" } | ||
| maps.v.cb = { ":AvanteConflictChooseBoth<CR>", desc = "Choose both" } | ||
|
|
||
| maps.n.cc = { ":AvanteConflictChooseCursor<CR>", desc = "Choose cursor" } | ||
| maps.v.cc = { ":AvanteConflictChooseCursor<CR>", desc = "Choose cursor" } | ||
|
|
||
| maps.n["]x"] = { ":AvanteConflictPrevConflict<CR>", desc = "Move to previous conflict" } | ||
| maps.v["]x"] = { ":AvanteConflictPrevConflict<CR>", desc = "Move to previous conflict" } | ||
|
|
||
| maps.n["[x"] = { ":AvanteConflictNextConflict<CR>", desc = "Move to next conflict" } | ||
| maps.x["[x"] = { ":AvanteConflictNextConflict<CR>", desc = "Move to next conflict" } | ||
| end, | ||
| }, | ||
| }, | ||
| opts = {}, | ||
mehalter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.