updates to avante and vscode yank settings
This commit is contained in:
parent
06c8cbb173
commit
c5f6c48249
3 changed files with 25 additions and 2 deletions
2
init.lua
2
init.lua
|
@ -82,7 +82,7 @@ else
|
|||
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "IncSearch", timeout = 1000 })
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
group = highlight_group,
|
||||
pattern = "*",
|
||||
|
|
|
@ -4,10 +4,24 @@ return {
|
|||
lazy = false,
|
||||
version = false,
|
||||
opts = {
|
||||
provider = "openai",
|
||||
provider = "claude",
|
||||
claude = {
|
||||
model = "claude-3-7-sonnet-latest",
|
||||
api_key_name = "cmd:cat " .. vim.fn.expand("~/.anthropic"),
|
||||
},
|
||||
openai = {
|
||||
model = "o3-mini",
|
||||
reasoning_effort = "high",
|
||||
api_key_name = "cmd:cat " .. vim.fn.expand("~/.openai"),
|
||||
},
|
||||
vendors = {
|
||||
ollama = {
|
||||
__inherited_from = "openai",
|
||||
api_key_name = "",
|
||||
endpoint = "http://127.0.0.1:11434/v1",
|
||||
model = "qwen2.5-coder",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||
build = "make",
|
||||
|
|
|
@ -6,6 +6,15 @@ keymap("n", "<Space>", "", opts)
|
|||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- highligh yank
|
||||
vim.api.nvim_set_hl(0, "YankHighlight", { guibg = "#d19a66" })
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 1000 })
|
||||
end,
|
||||
pattern = "*",
|
||||
})
|
||||
|
||||
-- yank to system clipboard
|
||||
keymap({ "n", "v" }, "<leader>y", '"+y', opts)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue