Adding documentation and login

This commit is contained in:
2026-01-14 21:32:01 -05:00
parent fb2bc3a713
commit 2f0ed73d53
2 changed files with 20 additions and 13 deletions

View File

@@ -14,9 +14,16 @@ return {
}, },
}, },
suggestion = { suggestion = {
enabled = true, enabled = true, -- Codetyper will use copilot when available
auto_trigger = true, -- Enable auto-trigger suggestions as you type auto_trigger = true,
debounce = 75, debounce = 75,
keymap = {
-- Let codetyper handle keymaps for unified experience
accept = false,
next = false,
prev = false,
dismiss = false,
},
}, },
filetypes = { filetypes = {
markdown = true, markdown = true,

View File

@@ -47,20 +47,20 @@ return {
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions ["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<C-e>"] = cmp.mapping.abort(), -- close completion window ["<C-e>"] = cmp.mapping.abort(), -- close completion window
["<CR>"] = cmp.mapping.confirm({ select = false }), ["<CR>"] = cmp.mapping.confirm({ select = false }),
-- Tab is reserved for Copilot inline suggestions ONLY -- Tab: codetyper suggestion > cmp selection > snippet jump > fallback
-- Use <C-j>/<C-k> to navigate cmp menu, <CR> to confirm
["<Tab>"] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
-- Check for Copilot inline suggestion first (highest priority) -- Check for codetyper ghost text suggestion first
local copilot_ok, copilot_suggestion = pcall(require, "copilot.suggestion") local ok, suggestion = pcall(require, "codetyper.suggestion")
if copilot_ok and copilot_suggestion.is_visible() then if ok and suggestion.is_visible() then
copilot_suggestion.accept() suggestion.accept()
return return
end end
-- If no Copilot suggestion, handle snippet jumping -- Then cmp menu
if luasnip.expand_or_jumpable() then if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump() luasnip.expand_or_jump()
else else
-- Default Tab behavior (insert tab character)
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
@@ -74,9 +74,9 @@ return {
end, { "i", "s" }), end, { "i", "s" }),
}), }),
-- sources for autocompletion -- sources for autocompletion
-- Note: codetyper uses ghost text suggestions (Copilot-style), not cmp source
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = "nvim_lsp", priority = 1000}, { name = "nvim_lsp", priority = 1000 },
{ name = "copilot", priority = 900 }, -- GitHub Copilot suggestions
{ name = "luasnip", priority = 750 }, -- snippets { name = "luasnip", priority = 750 }, -- snippets
{ name = "buffer", priority = 500, keyword_length = 3 }, -- text within current buffer { name = "buffer", priority = 500, keyword_length = 3 }, -- text within current buffer
{ name = "path", priority = 250 }, -- file system paths { name = "path", priority = 250 }, -- file system paths