update config
remove avante, codecompanion, update color scheme, update snack. add opencode
This commit is contained in:
parent
f440b58b5d
commit
7634d4c27b
|
|
@ -1,54 +0,0 @@
|
|||
return {}
|
||||
-- return {
|
||||
-- {
|
||||
-- 'yetone/avante.nvim',
|
||||
-- -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||
-- -- ⚠️ must add this setting! ! !
|
||||
-- build = vim.fn.has 'win32' ~= 0 and 'powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false' or 'make',
|
||||
-- event = 'VeryLazy',
|
||||
-- version = false, -- Never set this value to "*"! Never!
|
||||
-- opts = {
|
||||
-- -- add any opts here
|
||||
-- -- this file can contain specific instructions for your project
|
||||
-- instructions_file = 'avante.md',
|
||||
-- selection = {
|
||||
-- enabled = false,
|
||||
-- },
|
||||
-- selector = {
|
||||
-- provider = 'snacks',
|
||||
-- },
|
||||
-- input = {
|
||||
-- provider = 'snacks',
|
||||
-- provider_opts = {
|
||||
-- title = 'Avante Input',
|
||||
-- icon = ' ',
|
||||
-- },
|
||||
-- },
|
||||
-- -- for example
|
||||
-- provider = 'claude',
|
||||
-- providers = {
|
||||
-- claude = {
|
||||
-- endpoint = 'https://api.anthropic.com',
|
||||
-- model = 'claude-sonnet-4-20250514',
|
||||
-- timeout = 30000, -- Timeout in milliseconds
|
||||
-- extra_request_body = {
|
||||
-- temperature = 0.75,
|
||||
-- max_tokens = 20480,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- dependencies = {
|
||||
-- 'nvim-lua/plenary.nvim',
|
||||
-- 'MunifTanjim/nui.nvim',
|
||||
-- 'folke/snacks.nvim',
|
||||
-- {
|
||||
-- 'MeanderingProgrammer/render-markdown.nvim',
|
||||
-- opts = {
|
||||
-- file_types = { 'markdown', 'Avante' },
|
||||
-- },
|
||||
-- ft = { 'markdown', 'Avante' },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
return {
|
||||
-- {
|
||||
-- 'olimorris/codecompanion.nvim',
|
||||
-- dependencies = {
|
||||
-- 'nvim-lua/plenary.nvim',
|
||||
-- 'nvim-treesitter/nvim-treesitter',
|
||||
-- },
|
||||
-- opts = {
|
||||
-- adapters = {
|
||||
-- http = {
|
||||
-- anthropic = function()
|
||||
-- return require('codecompanion.adapters').extend('anthropic', {
|
||||
-- env = {
|
||||
-- api_key = os.getenv 'ANTHROPIC_API_KEY',
|
||||
-- model = 'claude-sonnet-4-20250514',
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
-- },
|
||||
-- strategies = {
|
||||
-- chat = { adapter = 'anthropic' },
|
||||
-- inline = { adapter = 'anthropic' },
|
||||
-- agent = { adapter = 'anthropic' },
|
||||
-- },
|
||||
-- display = {
|
||||
-- action_palette = {
|
||||
-- provider = 'snacks',
|
||||
-- opts = {
|
||||
-- show_default_actions = true, -- Show the default actions in the action palette?
|
||||
-- show_default_prompt_library = true, -- Show the default prompt library in the action palette?
|
||||
-- title = 'CodeCompanion actions', -- The title of the action palette
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- -- NOTE: The log_level is in `opts.opts`
|
||||
-- opts = {
|
||||
-- log_level = 'DEBUG', -- or "TRACE"
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- Codium:
|
||||
-- {
|
||||
-- 'Exafunction/windsurf.nvim',
|
||||
-- dependencies = {
|
||||
-- 'nvim-lua/plenary.nvim',
|
||||
-- 'hrsh7th/nvim-cmp',
|
||||
-- },
|
||||
-- config = function()
|
||||
-- require('codeium').setup {}
|
||||
-- vim.keymap.set('n', '<leader>tc', ':Codeium Toggle<CR>', { desc = 'Toggle Codeium' })
|
||||
-- end,
|
||||
-- },
|
||||
}
|
||||
|
|
@ -22,30 +22,30 @@ return {
|
|||
},
|
||||
-- themes
|
||||
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
|
||||
{
|
||||
'navarasu/onedark.nvim',
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
require('onedark').setup {
|
||||
style = 'darker',
|
||||
}
|
||||
-- Enable theme
|
||||
require('onedark').load()
|
||||
end,
|
||||
},
|
||||
{ 'marko-cerovac/material.nvim', priority = 1000 },
|
||||
-- {
|
||||
-- 'nxstynate/oneDarkPro.nvim',
|
||||
-- priority = 1000,
|
||||
-- opts = {
|
||||
-- palette_overrides = {
|
||||
-- dark0 = '#282c34',
|
||||
-- },
|
||||
-- },
|
||||
-- init = function()
|
||||
-- vim.cmd.colorscheme 'oneDarkPro'
|
||||
-- 'navarasu/onedark.nvim',
|
||||
-- priority = 1000, -- make sure to load this before all the other start plugins
|
||||
-- config = function()
|
||||
-- require('onedark').setup {
|
||||
-- style = 'darker',
|
||||
-- }
|
||||
-- -- Enable theme
|
||||
-- require('onedark').load()
|
||||
-- end,
|
||||
-- },
|
||||
-- { 'marko-cerovac/material.nvim', priority = 1000 },
|
||||
{
|
||||
'olimorris/onedarkpro.nvim',
|
||||
priority = 1000,
|
||||
-- opts = {
|
||||
-- palette_overrides = {
|
||||
-- dark0 = '#282c34',
|
||||
-- },
|
||||
-- },
|
||||
init = function()
|
||||
vim.cmd.colorscheme 'onedark'
|
||||
end,
|
||||
},
|
||||
{ 'NvChad/nvim-colorizer.lua', opts = {
|
||||
user_default_options = {
|
||||
css = true,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ return {
|
|||
jsonls = {},
|
||||
yamlls = {},
|
||||
lua_ls = {},
|
||||
pylsp = {},
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ return {
|
|||
'svelte',
|
||||
'lua_ls',
|
||||
'graphql',
|
||||
'emmet_language_server',
|
||||
-- 'emmet_language_server',
|
||||
'prismals',
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
return {
|
||||
'NickvanDyke/opencode.nvim',
|
||||
dependencies = { 'folke/snacks.nvim' },
|
||||
config = function()
|
||||
---@type opencode.Opts
|
||||
-- vim.g.opencode_opts = {}
|
||||
|
||||
-- Required for `opts.events.reload`.
|
||||
vim.o.autoread = true
|
||||
|
||||
-- Keymaps with port injection
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>oq', function()
|
||||
require('opencode').ask('@this: ', { submit = true })
|
||||
end, { desc = 'Ask opencode' })
|
||||
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>os', function()
|
||||
require('opencode').select()
|
||||
end, { desc = 'Execute opencode action…' })
|
||||
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>oa', function()
|
||||
require('opencode').prompt '@this'
|
||||
end, { desc = 'Add to opencode' })
|
||||
|
||||
vim.keymap.set({ 'n', 't' }, '<leader>ot', function()
|
||||
require('opencode').toggle()
|
||||
end, { desc = 'Toggle opencode' })
|
||||
|
||||
vim.keymap.set('n', '<leader>oT', function()
|
||||
require('opencode').command 'session.half.page.down'
|
||||
end, { desc = 'opencode half page down' })
|
||||
end,
|
||||
}
|
||||
|
|
@ -24,6 +24,11 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
layout = {
|
||||
layout = {
|
||||
width = 28,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, { noremap = true, des
|
|||
vim.api.nvim_set_keymap('n', '<leader>yr', ":let @+=expand('%:.%:t')<CR>", { noremap = true, silent = true, desc = 'Copy Relative Path' })
|
||||
vim.api.nvim_set_keymap('n', '<leader>ya', ":let @+=expand('%:P%:t')<CR>", { noremap = true, silent = true, desc = 'Copy Absolute Path' })
|
||||
|
||||
vim.g.diagnostics_active = true
|
||||
vim.g.diagnostics_active = false
|
||||
function _G.toggle_diagnostics()
|
||||
if vim.g.diagnostics_active then
|
||||
vim.g.diagnostics_active = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue