AutoYADM commit: 2024-12-13 17:00:01

This commit is contained in:
Daniel Fichtinger 2024-12-13 17:00:01 -05:00
parent 011bb03b52
commit ef96c8de23
2 changed files with 27 additions and 24 deletions

View file

@ -4,11 +4,9 @@ if follow_main then
end end
return { return {
-- { "giuxtaposition/blink-cmp-copilot", enabled = false }, { "giuxtaposition/blink-cmp-copilot", enabled = false },
{ {
"saghen/blink.cmp", "saghen/blink.cmp",
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = { opts = {
appearance = { appearance = {
nerd_font_variant = "mono", nerd_font_variant = "mono",
@ -17,7 +15,7 @@ return {
accept = { accept = {
-- experimental auto-brackets support -- experimental auto-brackets support
auto_brackets = { auto_brackets = {
enabled = true, enabled = false,
}, },
}, },
menu = { menu = {
@ -28,15 +26,19 @@ return {
documentation = { documentation = {
auto_show = true, auto_show = true,
auto_show_delay_ms = 200, auto_show_delay_ms = 200,
treesitter_highlighting = true, treesitter_highlighting = false,
window = { window = {
winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,CursorLine:BlinkCmpDocCursorLine,Search:None", -- winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,CursorLine:BlinkCmpDocCursorLine,Search:None",
}, },
}, },
ghost_text = { ghost_text = {
enabled = vim.g.ai_cmp, enabled = vim.g.ai_cmp,
-- enabled = false,
}, },
}, },
sources = {
default = { "lsp", "path", "snippets", "buffer" },
},
keymap = { keymap = {
preset = "default", preset = "default",
@ -44,6 +46,7 @@ return {
-- LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), -- LazyVim.cmp.map({ "snippet_forward", "ai_accept" }),
-- "fallback", -- "fallback",
-- }, -- },
["<Tab>"] = { "fallback" },
["<C-Cr>"] = { "select_and_accept", "fallback" }, ["<C-Cr>"] = { "select_and_accept", "fallback" },
["<C-l>"] = { "select_prev" }, ["<C-l>"] = { "select_prev" },
["<C-h>"] = { "select_next" }, ["<C-h>"] = { "select_next" },

View file

@ -3,24 +3,24 @@ return {
"zbirenbaum/copilot-cmp", "zbirenbaum/copilot-cmp",
enabled = false, enabled = false,
opts = function() opts = function()
require("copilot.command").disable() -- require("copilot.command").disable()
local cptoggle = Snacks.toggle.new({ -- local cptoggle = Snacks.toggle.new({
name = "Copilot", -- name = "Copilot",
-- map = vim.keymap.set, -- -- map = vim.keymap.set,
which_key = true, -- which_key = true,
get = function() -- get = function()
return not require("copilot.client").is_disabled() -- return not require("copilot.client").is_disabled()
end, -- end,
notify = true, -- notify = true,
set = function(state) -- set = function(state)
if state then -- if state then
require("copilot.command").enable() -- require("copilot.command").enable()
else -- else
require("copilot.command").disable() -- require("copilot.command").disable()
end -- end
end, -- end,
}) -- })
Snacks.toggle.map(cptoggle, "<leader>at", { desc = "Toggle Copilot" }) -- Snacks.toggle.map(cptoggle, "<leader>at", { desc = "Toggle Copilot" })
end, end,
}, },
{ "CopilotC-Nvim/CopilotChat.nvim", opts = { { "CopilotC-Nvim/CopilotChat.nvim", opts = {