feat(nvim): move from avante to codecompanion (#222)
Change the AI tool from [avante][0] to [codecompanion][1] to check if it's a better alternative. Also, install additional tools such as: * [mcphub][2] * [vectorcode][3] These should improve the experience with AI tooling. Reviewed-on: #222 [0]: https://github.com/yetone/avante.nvim [1]: https://codecompanion.olimorris.dev/ [2]: https://github.com/ravitemer/mcphub.nvim [3]: https://github.com/Davidyz/VectorCode Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com> Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
This commit is contained in:
parent
44757c8919
commit
44eca8b20d
21
config/mcphub/config.json
Normal file
21
config/mcphub/config.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"context7": {
|
||||||
|
"command": "pnpm",
|
||||||
|
"args": [
|
||||||
|
"dlx",
|
||||||
|
"@upstash/context7-mcp@latest"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"git": {
|
||||||
|
"command": "uvx",
|
||||||
|
"args": [
|
||||||
|
"mcp-server-git"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"vectorcode": {
|
||||||
|
"command": "vectorcode-mcp-server",
|
||||||
|
"args": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -29,7 +29,7 @@
|
|||||||
"go:github.com/bloznelis/typioca" = "3.1.0"
|
"go:github.com/bloznelis/typioca" = "3.1.0"
|
||||||
"npm:@anthropic-ai/claude-code" = "0.2.78"
|
"npm:@anthropic-ai/claude-code" = "0.2.78"
|
||||||
"pipx:aider-chat" = { version = "0.82.2", uvx_args = "--python 3.12.7 --with google-generativeai" }
|
"pipx:aider-chat" = { version = "0.82.2", uvx_args = "--python 3.12.7 --with google-generativeai" }
|
||||||
"pipx:vectorcode" = { version = "0.5.6", uvx_args = "--python 3.13.2" }
|
"pipx:vectorcode" = { version = "0.5.6", uvx_args = "--python 3.13.2", extras = "mcp" }
|
||||||
"ubi:Samyak2/toipe" = "0.5.0"
|
"ubi:Samyak2/toipe" = "0.5.0"
|
||||||
"ubi:hlsxx/tukai" = "0.2.2"
|
"ubi:hlsxx/tukai" = "0.2.2"
|
||||||
"ubi:jdx/usage" = "2.0.7"
|
"ubi:jdx/usage" = "2.0.7"
|
||||||
|
@ -145,137 +145,158 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'yetone/avante.nvim',
|
'ravitemer/mcphub.nvim',
|
||||||
event = 'VeryLazy',
|
dependencies = {
|
||||||
lazy = false,
|
'nvim-lua/plenary.nvim',
|
||||||
version = false,
|
},
|
||||||
|
cmd = 'MCPHub',
|
||||||
|
build = 'bundled_build.lua',
|
||||||
opts = {
|
opts = {
|
||||||
provider = 'gemini_pro',
|
port = 37373,
|
||||||
auto_suggestion_provider = 'gemini_flash',
|
config = vim.fn.expand '~/.config/mcphub/servers.json',
|
||||||
claude = {
|
native_servers = {},
|
||||||
model = 'claude-3-7-sonnet-20250219',
|
auto_approve = true,
|
||||||
temperature = 0,
|
auto_toggle_mcp_servers = true,
|
||||||
max_tokens = 20480,
|
extensions = {},
|
||||||
},
|
ui = {
|
||||||
vendors = {
|
window = {
|
||||||
gemini_pro = {
|
width = 0.8,
|
||||||
__inherited_from = 'gemini',
|
height = 0.8,
|
||||||
model = 'gemini-2.5-pro-exp-03-25',
|
relative = 'editor',
|
||||||
temperature = 0.25,
|
zindex = 50,
|
||||||
max_tokens = 204800,
|
|
||||||
},
|
|
||||||
gemini_flash = {
|
|
||||||
__inherited_from = 'gemini',
|
|
||||||
model = 'gemini-2.0-flash',
|
|
||||||
temperature = 0.25,
|
|
||||||
max_tokens = 20480,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
behaviour = {
|
|
||||||
auto_suggestions = false,
|
|
||||||
auto_set_highlight_group = true,
|
|
||||||
aute_set_keymaps = true,
|
|
||||||
auto_apply_diff_after_generation = true,
|
|
||||||
support_paste_from_clipboard = false,
|
|
||||||
minimize_diff = true,
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
diff = {
|
|
||||||
ours = 'co',
|
|
||||||
theirs = 'ct',
|
|
||||||
all_theirs = 'ca',
|
|
||||||
both = 'cb',
|
|
||||||
cursor = 'cc',
|
|
||||||
next = ']x',
|
|
||||||
prev = '[x',
|
|
||||||
},
|
|
||||||
suggestion = {
|
|
||||||
accept = '<M-l>',
|
|
||||||
next = '<M-]>',
|
|
||||||
prev = '<M-[>',
|
|
||||||
dismiss = '<C-]>',
|
|
||||||
},
|
|
||||||
jump = {
|
|
||||||
next = ']]',
|
|
||||||
prev = '[[',
|
|
||||||
},
|
|
||||||
submit = {
|
|
||||||
normal = '<CR>',
|
|
||||||
insert = '<C-s>',
|
|
||||||
},
|
|
||||||
sidebar = {
|
|
||||||
apply_all = 'A',
|
|
||||||
apply_cursor = 'a',
|
|
||||||
switch_windows = '<Tab>',
|
|
||||||
reverse_switch_windows = '<S-Tab>',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hints = { enabled = true },
|
|
||||||
windows = {
|
|
||||||
position = 'right',
|
|
||||||
wrap = true,
|
|
||||||
width = 30,
|
|
||||||
sidebar_header = {
|
|
||||||
enabled = true,
|
|
||||||
align = 'center',
|
|
||||||
rounded = true,
|
|
||||||
},
|
|
||||||
input = {
|
|
||||||
prefix = '> ',
|
|
||||||
height = 8,
|
|
||||||
},
|
|
||||||
edit = {
|
|
||||||
border = 'rounded',
|
border = 'rounded',
|
||||||
start_insert = true,
|
|
||||||
},
|
|
||||||
ask = {
|
|
||||||
floating = false,
|
|
||||||
start_insert = true,
|
|
||||||
border = 'rounded',
|
|
||||||
focus_on_apply = 'ours',
|
|
||||||
},
|
},
|
||||||
|
wo = {},
|
||||||
},
|
},
|
||||||
highlights = {
|
use_bundled_binary = true,
|
||||||
diff = {
|
log = {
|
||||||
current = 'DiffText',
|
level = vim.log.levels.WARN,
|
||||||
incoming = 'DiffAdd',
|
prefix = '[MCPHub]',
|
||||||
},
|
|
||||||
},
|
|
||||||
diff = {
|
|
||||||
autojump = true,
|
|
||||||
list_opener = 'copen',
|
|
||||||
override_timeoutlen = 500,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
build = 'make',
|
},
|
||||||
|
{
|
||||||
|
'Davidyz/VectorCode',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
'stevearc/dressing.nvim',
|
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
'MunifTanjim/nui.nvim',
|
},
|
||||||
'hrsh7th/nvim-cmp',
|
version = vim.fn.system { 'mise', 'current', 'pipx:vectorcode' },
|
||||||
'nvim-telescope/telescope.nvim',
|
opts = function()
|
||||||
'nvim-tree/nvim-web-devicons',
|
return {
|
||||||
{
|
async_opts = {
|
||||||
'HakonHarnes/img-clip.nvim',
|
debounce = 10,
|
||||||
event = 'VeryLazy',
|
events = { 'BufWritePost', 'InsertEnter', 'BufReadPost' },
|
||||||
opts = {
|
exclude_this = true,
|
||||||
default = {
|
n_query = 1,
|
||||||
embed_image_as_base64 = false,
|
notify = false,
|
||||||
prompt_for_file_name = false,
|
query_cb = require('vectorcode.utils').make_surrounding_lines_cb(-1),
|
||||||
drag_and_drop = {
|
run_on_register = false,
|
||||||
insert_mode = true,
|
|
||||||
},
|
|
||||||
use_absolute_path = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
async_backend = 'default',
|
||||||
|
exclude_this = true,
|
||||||
|
n_query = 1,
|
||||||
|
notify = true,
|
||||||
|
timeout_ms = 5000,
|
||||||
|
on_setup = {
|
||||||
|
update = false,
|
||||||
|
lsp = false,
|
||||||
|
},
|
||||||
|
sync_log_env_var = false,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'olimorris/codecompanion.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
{
|
{
|
||||||
'MeanderingProgrammer/render-markdown.nvim',
|
'MeanderingProgrammer/render-markdown.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
file_types = { 'markdown', 'Avante' },
|
file_types = { 'markdown', 'codecompanion' },
|
||||||
},
|
},
|
||||||
ft = { 'markdown', 'Avante' },
|
ft = { 'markdown', 'codecompanion' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = function()
|
||||||
|
return {
|
||||||
|
display = {
|
||||||
|
action_palette = {
|
||||||
|
width = 95,
|
||||||
|
height = 15,
|
||||||
|
prompt = 'Prompt',
|
||||||
|
provide = 'telescope',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
adapters = {
|
||||||
|
gemini_pro = function()
|
||||||
|
return require('codecompanion.adapters').extend('gemini', {
|
||||||
|
name = 'gemini_pro',
|
||||||
|
schema = {
|
||||||
|
model = {
|
||||||
|
default = 'gemini-2.5-pro-exp-03-25',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
gemini_flash = function()
|
||||||
|
return require('codecompanion.adapters').extend('gemini', {
|
||||||
|
name = 'gemini_flash',
|
||||||
|
schema = {
|
||||||
|
model = {
|
||||||
|
default = 'gemini-2.0-flash',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
vectorcode = {
|
||||||
|
opts = {
|
||||||
|
add_tool = true,
|
||||||
|
add_slash_command = true,
|
||||||
|
tool_opts = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mcphub = {
|
||||||
|
callback = 'mcphub.extensions.codecompanion',
|
||||||
|
opts = {
|
||||||
|
make_slash_commands = true,
|
||||||
|
make_vars = true,
|
||||||
|
show_result_in_chat = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
strategies = {
|
||||||
|
chat = { adapter = 'gemini_pro' },
|
||||||
|
inline = { adapter = 'gemini_flash' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>aa',
|
||||||
|
'<cmd>CodeCompanionActions<cr>',
|
||||||
|
mode = { 'n', 'v' },
|
||||||
|
desc = 'CodeCompaion actions',
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>at',
|
||||||
|
'<cmd>CodeCompanionChat Toggle<cr>',
|
||||||
|
mode = { 'n', 'v' },
|
||||||
|
desc = 'CodeCompanion toggle chat',
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ga',
|
||||||
|
'<cmd>CodeCompanionChat add<cr>',
|
||||||
|
mode = 'v',
|
||||||
|
desc = 'CodeCompanion add to chat',
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
4
config/vectorcode/config.json5
Normal file
4
config/vectorcode/config.json5
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"host": "chroma",
|
||||||
|
"port": "8000"
|
||||||
|
}
|
@ -21,11 +21,13 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- './config/atuin:/home/coder/.config/atuin'
|
- './config/atuin:/home/coder/.config/atuin'
|
||||||
- './config/git:/home/coder/.config/git'
|
- './config/git:/home/coder/.config/git'
|
||||||
|
- './config/mcphub:/home/coder/.config/mcphub'
|
||||||
- './config/mise:/home/coder/.config/mise'
|
- './config/mise:/home/coder/.config/mise'
|
||||||
- './config/nvim/lua/custom:/home/coder/.config/nvim/lua/custom'
|
- './config/nvim/lua/custom:/home/coder/.config/nvim/lua/custom'
|
||||||
- './config/starship:/home/coder/.config/starship'
|
- './config/starship:/home/coder/.config/starship'
|
||||||
- './config/tmux:/home/coder/.config/tmux'
|
- './config/tmux:/home/coder/.config/tmux'
|
||||||
- './config/tmuxp:/home/coder/.config/tmuxp'
|
- './config/tmuxp:/home/coder/.config/tmuxp'
|
||||||
|
- './config/vectorcode:/home/coder/.config/vectorcode'
|
||||||
- 'home_cache:/home/coder/.cache'
|
- 'home_cache:/home/coder/.cache'
|
||||||
- 'home_local_share:/home/coder/.local/share'
|
- 'home_local_share:/home/coder/.local/share'
|
||||||
- 'home_local_state:/home/coder/.local/state'
|
- 'home_local_state:/home/coder/.local/state'
|
||||||
@ -42,7 +44,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- 'chroma_data:/data'
|
- 'chroma_data:/data'
|
||||||
ports:
|
ports:
|
||||||
- '${IDE_CHROMA_PORT:-8000}'
|
- '${IDE_CHROMA_PORT:-18000:8000}'
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
home_cache: {}
|
home_cache: {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user