v1.6
This commit is contained in:
parent
3b7eee30c6
commit
59c79a8aa8
7 changed files with 150 additions and 187 deletions
|
|
@ -1,123 +0,0 @@
|
|||
return {
|
||||
'yetone/avante.nvim',
|
||||
event = 'VeryLazy',
|
||||
lazy = false,
|
||||
version = false, -- set this if you want to always pull the latest change
|
||||
opts = {
|
||||
-- add any opts here
|
||||
{
|
||||
---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string
|
||||
provider = 'copilot', -- Recommend using Claude
|
||||
auto_suggestions_provider = 'copilot', -- Since auto-suggestions are a high-frequency operation and therefore expensive, it is recommended to specify an inexpensive provider or even a free provider: copilot
|
||||
-- claude = {
|
||||
-- endpoint = 'https://api.anthropic.com',
|
||||
-- model = 'claude-3-5-sonnet-20240620',
|
||||
-- temperature = 0,
|
||||
-- max_tokens = 4096,
|
||||
-- },
|
||||
behaviour = {
|
||||
auto_suggestions = false, -- Experimental stage
|
||||
auto_set_highlight_group = true,
|
||||
auto_set_keymaps = true,
|
||||
auto_apply_diff_after_generation = false,
|
||||
support_paste_from_clipboard = true,
|
||||
},
|
||||
mappings = {
|
||||
--- @class AvanteConflictMappings
|
||||
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>',
|
||||
},
|
||||
},
|
||||
hints = { enabled = true },
|
||||
windows = {
|
||||
---@type "right" | "left" | "top" | "bottom"
|
||||
position = 'right', -- the position of the sidebar
|
||||
wrap = true, -- similar to vim.o.wrap
|
||||
width = 30, -- default % based on available width
|
||||
sidebar_header = {
|
||||
align = 'center', -- left, center, right for title
|
||||
rounded = true,
|
||||
},
|
||||
},
|
||||
highlights = {
|
||||
---@type AvanteConflictHighlights
|
||||
diff = {
|
||||
current = 'DiffText',
|
||||
incoming = 'DiffAdd',
|
||||
},
|
||||
},
|
||||
--- @class AvanteConflictUserConfig
|
||||
diff = {
|
||||
autojump = true,
|
||||
---@type string | fun(): any
|
||||
list_opener = 'copen',
|
||||
},
|
||||
},
|
||||
},
|
||||
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||
build = 'make',
|
||||
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
|
||||
dependencies = {
|
||||
'stevearc/dressing.nvim',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'MunifTanjim/nui.nvim',
|
||||
--- The below dependencies are optional,
|
||||
'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons
|
||||
'zbirenbaum/copilot.lua', -- for providers='copilot'
|
||||
{
|
||||
-- support for image pasting
|
||||
'HakonHarnes/img-clip.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
-- recommended settings
|
||||
default = {
|
||||
embed_image_as_base64 = false,
|
||||
prompt_for_file_name = false,
|
||||
drag_and_drop = {
|
||||
insert_mode = true,
|
||||
},
|
||||
-- required for Windows users
|
||||
use_absolute_path = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
-- Make sure to set this up properly if you have lazy=true
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
opts = {
|
||||
file_types = { 'markdown', 'Avante' },
|
||||
},
|
||||
ft = { 'markdown', 'Avante' },
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd('VimEnter', {
|
||||
callback = function()
|
||||
-- Ensure Avante.nvim has been loaded before switching providers
|
||||
if vim.fn.exists ':AvanteSwitchProvider' == 2 then
|
||||
vim.cmd 'AvanteSwitchProvider copilot'
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
25
lua/custom/plugins/codeium.lua
Normal file
25
lua/custom/plugins/codeium.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
'Exafunction/codeium.vim',
|
||||
event = 'BufEnter',
|
||||
config = function()
|
||||
-- Change '<C-g>' here to any keycode you like.
|
||||
vim.keymap.set('i', '<C-l>', function()
|
||||
return vim.fn['codeium#Accept']()
|
||||
end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<C-;>', function()
|
||||
return vim.fn['codeium#CycleCompletions'](1)
|
||||
end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<C-,>', function()
|
||||
return vim.fn['codeium#CycleCompletions'](-1)
|
||||
end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<C-x>', function()
|
||||
return vim.fn['codeium#Clear']()
|
||||
end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<C-n>', function()
|
||||
return vim.fn['codeium#CycleCompletions(1)']()
|
||||
end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<leader>cc', function()
|
||||
return vim.fn['codeium#Chat()']()
|
||||
end, { expr = true, silent = true })
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
return {
|
||||
{
|
||||
'CopilotC-Nvim/CopilotChat.nvim',
|
||||
branch = 'canary',
|
||||
dependencies = {
|
||||
{ 'zbirenbaum/copilot.lua' }, -- or github/copilot.vim
|
||||
{ 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper
|
||||
},
|
||||
build = 'make tiktoken', -- Only on MacOS or Linux
|
||||
keys = {
|
||||
{
|
||||
'<leader>ccq',
|
||||
function()
|
||||
local input = vim.fn.input 'Quick Chat: '
|
||||
if input ~= '' then
|
||||
require('CopilotChat').ask(input, { selection = require('CopilotChat.select').buffer })
|
||||
end
|
||||
end,
|
||||
desc = 'CopilotChat Buffer chat',
|
||||
},
|
||||
{
|
||||
'<leader>cct',
|
||||
'<cmd>CopilotChatToggle<CR>',
|
||||
desc = 'Copilot Chat Toggle',
|
||||
},
|
||||
-- {
|
||||
-- '<leader>ccs',
|
||||
-- 'CopilotChatSave',
|
||||
-- desc = 'CopilotChat - Quick chat',
|
||||
-- },
|
||||
},
|
||||
opts = {
|
||||
debug = false, -- Enable debug logging
|
||||
window = {
|
||||
layout = 'float',
|
||||
relative = 'editor',
|
||||
title = 'Copilot',
|
||||
footer = '<C-i> to toggle chat | <C-l> to clean chat',
|
||||
width = 0.6,
|
||||
height = 0.5,
|
||||
row = 0,
|
||||
border = 'rounded', -- 'none', single', 'double', 'rounded', 'solid', 'shadow'
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -135,5 +135,57 @@ return {
|
|||
end,
|
||||
config = true,
|
||||
},
|
||||
{ 'github/copilot.vim' },
|
||||
-- {
|
||||
-- 'zbirenbaum/copilot.lua',
|
||||
-- cmd = 'Copilot',
|
||||
-- event = 'InsertEnter',
|
||||
-- config = function()
|
||||
-- require('copilot').setup {
|
||||
-- panel = {
|
||||
-- enabled = true,
|
||||
-- auto_refresh = false,
|
||||
-- keymap = {
|
||||
-- jump_prev = '[[',
|
||||
-- jump_next = ']]',
|
||||
-- accept = '<CR>',
|
||||
-- refresh = 'gr',
|
||||
-- open = '<M-CR>',
|
||||
-- },
|
||||
-- layout = {
|
||||
-- position = 'bottom', -- | top | left | right
|
||||
-- ratio = 0.4,
|
||||
-- },
|
||||
-- },
|
||||
-- suggestion = {
|
||||
-- enabled = true,
|
||||
-- auto_trigger = true,
|
||||
-- hide_during_completion = true,
|
||||
-- debounce = 75,
|
||||
-- keymap = {
|
||||
-- accept = '<M-l>',
|
||||
-- accept_word = false,
|
||||
-- accept_line = false,
|
||||
-- next = '<M-]>',
|
||||
-- prev = '<M-[>',
|
||||
-- dismiss = '<C-]>',
|
||||
-- },
|
||||
-- },
|
||||
-- filetypes = {
|
||||
-- yaml = false,
|
||||
-- markdown = false,
|
||||
-- help = false,
|
||||
-- gitcommit = false,
|
||||
-- gitrebase = false,
|
||||
-- hgcommit = false,
|
||||
-- svn = false,
|
||||
-- cvs = false,
|
||||
-- ['.'] = false,
|
||||
-- },
|
||||
-- copilot_node_command = 'node', -- Node.js version must be > 18.x
|
||||
-- server_opts_overrides = {},
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
{ 'norcalli/nvim-colorizer.lua' },
|
||||
{ 'wsdjeg/vim-chat' },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ return {
|
|||
-- see `:h neo-tree-custom-commands-global`
|
||||
commands = {},
|
||||
window = {
|
||||
position = 'right',
|
||||
position = 'left',
|
||||
width = 40,
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
|
|
@ -334,7 +334,7 @@ return {
|
|||
}
|
||||
|
||||
-- vim.cmd [[nnoremap \ :Neotree reveal<cr>]]
|
||||
vim.keymap.set('n', '<leader>e', ':Neotree toggle position=right<CR>', { noremap = true, silent = true }) -- focus file explorer
|
||||
vim.keymap.set('n', '<leader>e', ':Neotree toggle position=left<CR>', { noremap = true, silent = true }) -- focus file explorer
|
||||
vim.keymap.set('n', '<leader>gt', ':Neotree float git_status<CR>', { noremap = true, silent = true }) -- open git status window
|
||||
end,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue