Neovim nvim-cmp copilot.vim integration using Tab

cmp.setup({ ... mapping = cmp.mapping.preset.insert({ ["<Tab>"] = cmp.mapping(function(fallback) local copilot_keys = vim.fn["copilot#Accept"]() if cmp.visible() then cmp.confirm({ select = true }) elseif copilot_keys ~= "" and type(copilot_keys) == "string" then vim.api.nvim_feedkeys(copilot_keys, "n", true) else fallback() end end, { "i", "s", }), }), ... })

July 1, 2022

Neovim configuration

This post provides the configuration files for a setup in lua and using Neovim’s built-in LSP client and a reasoning around those choices. All the configuration can be found here. This isn’t by any means a guide on how to do things, neither an example of good code. It just works™. init.lua There isn’t much to see here, just entry points for configuration files and a weird command atop. The later just makes gf navigate to the configuration file used as parameter inside require. It can safely be ignored. ...

August 10, 2021