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 = {
enabled = true,
auto_trigger = true, -- Enable auto-trigger suggestions as you type
enabled = true, -- Codetyper will use copilot when available
auto_trigger = true,
debounce = 75,
keymap = {
-- Let codetyper handle keymaps for unified experience
accept = false,
next = false,
prev = false,
dismiss = false,
},
},
filetypes = {
markdown = true,

View File

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