Skip to content

Commit 230929c

Browse files
committed
fix(my-account-ui): [CUSTMIC-] delete backupt add copilot
1 parent 7f0f862 commit 230929c

File tree

2 files changed

+40
-66
lines changed

2 files changed

+40
-66
lines changed

backup

Lines changed: 0 additions & 1 deletion
This file was deleted.

lua/kickstart/plugins/blink-cmp.lua

Lines changed: 40 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -9,93 +9,68 @@ return {
99
'L3MON4D3/LuaSnip',
1010
version = '2.*',
1111
build = (function()
12-
-- Build Step is needed for regex support in snippets.
13-
-- This step is not supported in many windows environments.
14-
-- Remove the below condition to re-enable on windows.
1512
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
1613
return
1714
end
1815
return 'make install_jsregexp'
1916
end)(),
20-
dependencies = {
21-
-- `friendly-snippets` contains a variety of premade snippets.
22-
-- See the README about individual language/framework/plugin snippets:
23-
-- https://github.com/rafamadriz/friendly-snippets
24-
-- {
25-
-- 'rafamadriz/friendly-snippets',
26-
-- config = function()
27-
-- require('luasnip.loaders.from_vscode').lazy_load()
28-
-- end,
29-
-- },
30-
},
17+
dependencies = {},
3118
opts = {},
3219
},
3320
'folke/lazydev.nvim',
34-
},
35-
--- @module 'blink.cmp'
36-
--- @type blink.cmp.Config
37-
opts = {
38-
keymap = {
39-
-- 'default' (recommended) for mappings similar to built-in completions
40-
-- <c-y> to accept ([y]es) the completion.
41-
-- This will auto-import if your LSP supports it.
42-
-- This will expand snippets if the LSP sent a snippet.
43-
-- 'super-tab' for tab to accept
44-
-- 'enter' for enter to accept
45-
-- 'none' for no mappings
46-
--
47-
-- For an understanding of why the 'default' preset is recommended,
48-
-- you will need to read `:help ins-completion`
49-
--
50-
-- No, but seriously. Please read `:help ins-completion`, it is really good!
51-
--
52-
-- All presets have the following mappings:
53-
-- <tab>/<s-tab>: move to right/left of your snippet expansion
54-
-- <c-space>: Open menu or open docs if already open
55-
-- <c-n>/<c-p> or <up>/<down>: Select next/previous item
56-
-- <c-e>: Hide menu
57-
-- <c-k>: Toggle signature help
58-
--
59-
-- See :h blink-cmp-config-keymap for defining your own keymap
60-
preset = 'default',
6121

62-
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
63-
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
22+
-- Copilot backend (Lua) -- disable inline/panel; we'll use Blink only
23+
{
24+
'zbirenbaum/copilot.lua',
25+
cmd = 'Copilot',
26+
build = ':Copilot auth',
27+
event = 'BufReadPost',
28+
opts = {
29+
suggestion = { enabled = false },
30+
panel = { enabled = false },
31+
},
6432
},
6533

66-
appearance = {
67-
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
68-
-- Adjusts spacing to ensure icons are aligned
69-
nerd_font_variant = 'mono',
70-
},
34+
-- Blink source for Copilot
35+
'giuxtaposition/blink-cmp-copilot',
36+
},
7137

72-
completion = {
73-
-- By default, you may press `<c-space>` to show the documentation.
74-
-- Optionally, set `auto_show = true` to show the documentation after a delay.
75-
documentation = { auto_show = false, auto_show_delay_ms = 500 },
76-
},
38+
--- @module 'blink.cmp'
39+
--- @type blink.cmp.Config
40+
opts = {
41+
keymap = { preset = 'default' },
42+
appearance = { nerd_font_variant = 'mono' },
43+
completion = { documentation = { auto_show = false, auto_show_delay_ms = 500 } },
7744

7845
sources = {
79-
default = { 'lsp', 'path', 'snippets', 'lazydev' },
46+
-- add "copilot" to the default sources
47+
default = { 'lsp', 'path', 'snippets', 'lazydev', 'copilot' },
8048
providers = {
8149
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
50+
51+
-- define the Copilot provider for Blink
52+
copilot = {
53+
name = 'copilot',
54+
module = 'blink-cmp-copilot',
55+
async = true,
56+
score_offset = 100, -- slightly boost Copilot
57+
-- optional: mark items visually as "Copilot"
58+
transform_items = function(_, items)
59+
local Kind = require('blink.cmp.types').CompletionItemKind
60+
local idx = #Kind + 1
61+
Kind[idx] = 'Copilot'
62+
for _, item in ipairs(items) do
63+
item.kind = idx
64+
end
65+
return items
66+
end,
67+
},
8268
},
8369
},
8470

8571
snippets = { preset = 'luasnip' },
86-
87-
-- Blink.cmp includes an optional, recommended rust fuzzy matcher,
88-
-- which automatically downloads a prebuilt binary when enabled.
89-
--
90-
-- By default, we use the Lua implementation instead, but you may enable
91-
-- the rust implementation via `'prefer_rust_with_warning'`
92-
--
93-
-- See :h blink-cmp-config-fuzzy for more information
9472
fuzzy = { implementation = 'lua' },
95-
96-
-- Shows a signature help window while you type arguments for a function
9773
signature = { enabled = true },
9874
},
9975
},
10076
}
101-
-- vim: ts=2 sts=2 sw=2 et

0 commit comments

Comments
 (0)