feat: autocomplete (#71)

This commit is contained in:
Hari 2026-04-14 12:43:57 -04:00 committed by GitHub
parent d352c45733
commit fa2260d8d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 25 additions and 4 deletions

View file

@ -44,7 +44,7 @@ return {
}, },
}, },
}, },
ghost_text = { enabled = true }, ghost_text = { enabled = false },
}, },
fuzzy = { implementation = "lua" }, fuzzy = { implementation = "lua" },
sources = { sources = {

View file

@ -0,0 +1,19 @@
vim.pack.add({
"https://github.com/monkoose/neocodeium",
}, { load = function() end })
return {
"monkoose/neocodeium",
event = "InsertEnter",
after = function()
local neocodeium = require "neocodeium"
neocodeium.setup()
vim.keymap.set("i", "<Right>", neocodeium.accept)
vim.keymap.set("i", "<A-w>", neocodeium.accept_word)
vim.keymap.set("i", "<A-a>", neocodeium.accept_line)
vim.keymap.set("i", "<A-e>", neocodeium.cycle_or_complete)
vim.keymap.set("i", "<A-r>", function() neocodeium.cycle_or_complete(-1) end)
vim.keymap.set("i", "<A-c>", neocodeium.clear)
end,
}

View file

@ -17,4 +17,6 @@ map("x", "p", '"_dP')
map("n", "<Esc>", "<cmd>nohlsearch<cr>") map("n", "<Esc>", "<cmd>nohlsearch<cr>")
map("n", "<leader>t", "<cmd>setlocal wrap!<cr>") map("n", "<leader>t", "<cmd>setlocal wrap!<cr>")
map("n", "<C-W>]", "<cmd>vert winc ]<cr>")
map("t", "<Esc>", "<C-\\><C-n>") map("t", "<Esc>", "<C-\\><C-n>")

View file

@ -51,9 +51,9 @@ in
stylua stylua
tree-sitter tree-sitter
vscode-langservers-extracted vscode-langservers-extracted
nodePackages.bash-language-server bash-language-server
nodePackages.typescript typescript
nodePackages.typescript-language-server typescript-language-server
]; ];
}; };