feat: tokenizers (#429)
* feat: tokenizers
This reverts commit d5a4db8321.
* fix(inputs): #422
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
---------
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
25
README.md
25
README.md
@@ -30,11 +30,7 @@ https://github.com/user-attachments/assets/86140bfd-08b4-483d-a887-1b701d9e37dd
|
||||
opts = {
|
||||
-- add any opts here
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>aa", function() require("avante.api").ask() end, desc = "avante: ask", mode = { "n", "v" } },
|
||||
{ "<leader>ar", function() require("avante.api").refresh() end, desc = "avante: refresh" },
|
||||
{ "<leader>ae", function() require("avante.api").edit() end, desc = "avante: edit", mode = "v" },
|
||||
},
|
||||
build = ":AvanteBuild", -- This is optional, recommended tho. Also note that this will block the startup for a bit since we are compiling bindings in Rust.
|
||||
dependencies = {
|
||||
"stevearc/dressing.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
@@ -90,9 +86,14 @@ Plug 'HakonHarnes/img-clip.nvim'
|
||||
Plug 'zbirenbaum/copilot.lua'
|
||||
|
||||
" Yay
|
||||
Plug 'yetone/avante.nvim'
|
||||
Plug 'yetone/avante.nvim', { 'branch': 'main', 'do': ':AvanteBuild', 'on': 'AvanteAsk' }
|
||||
```
|
||||
|
||||
> [!important]
|
||||
>
|
||||
> For `avante.tokenizers` to work, make sure to call `require('avante_lib').load()` somewhere when entering the editor.
|
||||
> We will leave the users to decide where it fits to do this, as this varies among configurations. (But we do recommend running this after where you set your colorscheme)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
@@ -100,32 +101,32 @@ Plug 'yetone/avante.nvim'
|
||||
<summary><a href="https://github.com/echasnovski/mini.deps">mini.deps</a></summary>
|
||||
|
||||
```lua
|
||||
local add, later = MiniDeps.add, MiniDeps.later
|
||||
local add, later, now = MiniDeps.add, MiniDeps.later, MiniDeps.now
|
||||
|
||||
add({
|
||||
source = 'yetone/avante.nvim',
|
||||
monitor = 'main',
|
||||
depends = {
|
||||
'stevearc/dressing.nvim',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'MunifTanjim/nui.nvim',
|
||||
'echasnovski/mini.icons'
|
||||
},
|
||||
hooks = { post_checkout = function() vim.cmd('AvanteBuild') end }
|
||||
})
|
||||
--- optional
|
||||
add({ source = 'zbirenbaum/copilot.lua' })
|
||||
add({ source = 'HakonHarnes/img-clip.nvim' })
|
||||
add({ source = 'MeanderingProgrammer/render-markdown.nvim' })
|
||||
|
||||
now(function() require('avante_lib').load() end)
|
||||
later(function() require('render-markdown').setup({...}) end)
|
||||
later(function()
|
||||
require('img-clip').setup({...}) -- config img-clip
|
||||
require("copilot").setup({...}) -- setup copilot to your liking
|
||||
require("avante").setup({...}) -- config for avante.nvim
|
||||
end)
|
||||
|
||||
```
|
||||
```
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
@@ -171,6 +172,10 @@ require('avante').setup ({
|
||||
> }
|
||||
> ```
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> Any rendering plugins that support markdown should work with Avante as long as you add the supported filetype `Avante`. See https://github.com/yetone/avante.nvim/issues/175 and [this comment](https://github.com/yetone/avante.nvim/issues/175#issuecomment-2313749363) for more information.
|
||||
|
||||
### Default setup configuration
|
||||
|
||||
_See [config.lua#L9](./lua/avante/config.lua) for the full config_
|
||||
|
||||
Reference in New Issue
Block a user