applied plugins / replaced avante
This commit is contained in:
parent
633ef6a9cb
commit
d99e522f94
3 changed files with 116 additions and 167 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
require('avante').setup({
|
|
||||||
provider = 'copilot',
|
|
||||||
providers = {
|
|
||||||
copilot = {
|
|
||||||
model = "claude-3.7-sonnet",
|
|
||||||
timeout = 30000, -- Timeout in milliseconds
|
|
||||||
},
|
|
||||||
},
|
|
||||||
selector = {
|
|
||||||
exclude_auto_select = { "oil" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
10
lua/plugin/code-companion.lua
Normal file
10
lua/plugin/code-companion.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
require("codecompanion").setup({
|
||||||
|
strategies = {
|
||||||
|
chat = {
|
||||||
|
adapter = {
|
||||||
|
name = "copilot",
|
||||||
|
model = "claude-3.7-sonnet",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
115
lua/plugins.lua
115
lua/plugins.lua
|
|
@ -14,9 +14,10 @@ end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
{ 'gruvbox-community/gruvbox' },
|
{ "gruvbox-community/gruvbox" },
|
||||||
{ 'lewis6991/gitsigns.nvim' },
|
{ "lewis6991/gitsigns.nvim" },
|
||||||
{ 'tpope/vim-commentary' },
|
{ "tpope/vim-commentary" },
|
||||||
|
{ "tpope/vim-surround" },
|
||||||
{
|
{
|
||||||
"folke/snacks.nvim",
|
"folke/snacks.nvim",
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
|
|
@ -40,23 +41,24 @@ require("lazy").setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter", build = ":TSUpdate"
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
},
|
},
|
||||||
{ 'neovim/nvim-lspconfig' }, -- Required
|
{ "neovim/nvim-lspconfig" }, -- Required
|
||||||
{ -- Optional
|
{ -- Optional
|
||||||
'williamboman/mason.nvim',
|
"williamboman/mason.nvim",
|
||||||
build = function()
|
build = function()
|
||||||
pcall(vim.cmd, 'MasonUpdate')
|
pcall(vim.cmd, "MasonUpdate")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ 'williamboman/mason-lspconfig.nvim' }, -- Optional
|
{ "williamboman/mason-lspconfig.nvim" }, -- Optional
|
||||||
{
|
{
|
||||||
'stevearc/conform.nvim',
|
"stevearc/conform.nvim",
|
||||||
},
|
},
|
||||||
-- Autocompletion
|
-- Autocompletion
|
||||||
{ 'hrsh7th/nvim-cmp' }, -- Required
|
{ "hrsh7th/nvim-cmp" }, -- Required
|
||||||
{ 'hrsh7th/cmp-nvim-lsp' }, -- Required
|
{ "hrsh7th/cmp-nvim-lsp" }, -- Required
|
||||||
{ 'L3MON4D3/LuaSnip' }, -- Required
|
{ "L3MON4D3/LuaSnip" }, -- Required
|
||||||
-- roslyn
|
-- roslyn
|
||||||
{
|
{
|
||||||
"seblyng/roslyn.nvim",
|
"seblyng/roslyn.nvim",
|
||||||
|
|
@ -66,7 +68,7 @@ require("lazy").setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'stevearc/oil.nvim',
|
"stevearc/oil.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
dependencies = { { "echasnovski/mini.icons", opts = {} } },
|
dependencies = { { "echasnovski/mini.icons", opts = {} } },
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
|
@ -74,26 +76,28 @@ require("lazy").setup({
|
||||||
{
|
{
|
||||||
"ThePrimeagen/harpoon",
|
"ThePrimeagen/harpoon",
|
||||||
branch = "harpoon2",
|
branch = "harpoon2",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" }
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||||
ft = { "markdown" },
|
ft = { "markdown" },
|
||||||
build = function() vim.fn["mkdp#util#install"]() end,
|
build = function()
|
||||||
|
vim.fn["mkdp#util#install"]()
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
{ 'mhinz/vim-startify' },
|
{ "mhinz/vim-startify" },
|
||||||
{
|
{
|
||||||
'kristijanhusak/vim-dadbod-ui',
|
"kristijanhusak/vim-dadbod-ui",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ 'tpope/vim-dadbod', lazy = true },
|
{ "tpope/vim-dadbod", lazy = true },
|
||||||
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
|
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
|
||||||
},
|
},
|
||||||
cmd = {
|
cmd = {
|
||||||
'DBUI',
|
"DBUI",
|
||||||
'DBUIToggle',
|
"DBUIToggle",
|
||||||
'DBUIAddConnection',
|
"DBUIAddConnection",
|
||||||
'DBUIFindBuffer',
|
"DBUIFindBuffer",
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
-- Your DBUI configuration
|
-- Your DBUI configuration
|
||||||
|
|
@ -101,70 +105,17 @@ require("lazy").setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"yetone/avante.nvim",
|
"olimorris/codecompanion.nvim",
|
||||||
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
|
||||||
-- ⚠️ must add this setting! ! !
|
|
||||||
build = function()
|
|
||||||
-- conditionally use the correct build system for the current OS
|
|
||||||
if vim.fn.has("win32") == 1 then
|
|
||||||
return "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
|
|
||||||
else
|
|
||||||
return "make"
|
|
||||||
end
|
|
||||||
|
|
||||||
end,
|
|
||||||
event = "VeryLazy",
|
|
||||||
version = false, -- Never set this value to "*"! Never!
|
|
||||||
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"MunifTanjim/nui.nvim",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
|
||||||
--- The below dependencies are optional,
|
|
||||||
|
|
||||||
"echasnovski/mini.pick", -- for file_selector provider mini.pick
|
|
||||||
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
|
||||||
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
|
||||||
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
|
||||||
"stevearc/dressing.nvim", -- for input provider dressing
|
|
||||||
"folke/snacks.nvim", -- for input provider snacks
|
|
||||||
"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" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
}, opts)
|
}, opts)
|
||||||
|
|
||||||
|
local files = vim.split(vim.fn.globpath(vim.fn.stdpath("config") .. "/lua/plugin", "*.lua", true), "\n")
|
||||||
local files = vim.split(vim.fn.globpath(vim.fn.stdpath('config') .. '/lua/plugin', '*.lua', true), '\n')
|
|
||||||
|
|
||||||
for _, f in ipairs(files) do
|
for _, f in ipairs(files) do
|
||||||
local name = vim.fn.fnamemodify(f, ':t:r')
|
local name = vim.fn.fnamemodify(f, ":t:r")
|
||||||
require('plugin.' .. name)
|
require("plugin." .. name)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue