Neovim and VS Code— AI-Assisted Code Completion

Let’s try out AI-assisted code completion plugins for Neovim and VS Code.

5 min readNov 7, 2021


Photo by Gabriel Heinzer on Unsplash

Want to try out AI-assisted coding? Let’s check out a few plugins that provide AI-based code completion for Neovim and VS Code.

Check out the following article for more tips and tricks to configure a modern Neovim development environment!


Tabnine is a mature AI assistant and supports all major IDEs, including Vim/Neovim and VS Code.


For Neovim, you can use coc.nvim, deoplete.nvim, or nvim-cmp.

  • I am going to use nvim-cmp. Below I use packer.nvim to install cmp-tabnine together with other plugins.
use {
requires = {
config = function()
use { "tzachar/cmp-tabnine", run = "./" }
  • In cmp.lua, I configured cmp-tabnine as one of the completion sources.
cmp.setup {
formatting = {
format = function(entry, vim_item)
-- fancy icons and a name of kind
vim_item.kind = require("lspkind").presets.default[vim_item.kind] .. " " .. vim_item.kind
-- set a name for each source
local menu = ({
buffer = "[Buffer]",
nvim_lsp = "[LSP]",
ultisnips = "[UltiSnips]",
nvim_lua = "[Lua]",
cmp_tabnine = "[TabNine]",
look = "[Look]",
path = "[Path]",
spell = "[Spell]",
calc = "[Calc]",
emoji = "[Emoji]",
treesitter = "[treesitter]",
neorg = "[Neorg]",
if == "cmp_tabnine" then
if ~= nil and ~= nil




Software engineer, Data Science and ML practitioner.