{"id":13675341,"url":"https://github.com/codota/tabnine-nvim","last_synced_at":"2026-01-26T22:54:08.624Z","repository":{"id":65018374,"uuid":"571562456","full_name":"codota/tabnine-nvim","owner":"codota","description":"Tabnine Client for Neovim","archived":false,"fork":false,"pushed_at":"2025-02-14T14:49:24.000Z","size":18235,"stargazers_count":381,"open_issues_count":18,"forks_count":35,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-02-14T15:39:06.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tabnine.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codota.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-28T12:03:34.000Z","updated_at":"2025-02-14T14:49:29.000Z","dependencies_parsed_at":"2023-10-17T09:54:34.881Z","dependency_job_id":"fdab4de2-5bce-44e5-973e-581b8ef7d098","html_url":"https://github.com/codota/tabnine-nvim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codota%2Ftabnine-nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codota%2Ftabnine-nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codota%2Ftabnine-nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codota%2Ftabnine-nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codota","download_url":"https://codeload.github.com/codota/tabnine-nvim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240280835,"owners_count":19776414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T12:00:38.160Z","updated_at":"2026-01-26T22:54:08.559Z","avatar_url":"https://github.com/codota.png","language":"HTML","readme":"# tabnine-nvim\nTabnine client for Neovim\n\n![Tabnine Neovim client](https://github.com/codota/tabnine-nvim/blob/master/examples/javascript.gif)\n\n## Table of Contents\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Install](#install)\n  - [Unix (Linux, MacOS)](#unix-linux-macos)\n  - [Windows](#windows)\n- [Activate (mandatory)](#activate-mandatory)\n- [Activate Tabnine Pro](#activate-tabnine-pro)\n- [Tabnine Chat](#tabnine-chat)\n- [Commands](#commands)\n  - [Tabnine Chat commands](#tabnine-chat-commands)\n- [`\u003cTab\u003e` and `nvim-cmp`](#tab-and-nvim-cmp)\n- [lualine integration](#lualine-integration)\n- [Other statusline integrations](#other-statusline-integrations)\n- [Tabnine Enterprise customers (self hosted only)](#tabnine-enterprise-customers-self-hosted-only)\n- [Keymaps examples](#keymaps-examples)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Install\n\n**Note** this plugin requires having [Neovim](https://github.com/neovim/neovim) version \u003e= v0.7\n\nThe _Unix_ build script requires `curl` and `unzip` to be available in your `$PATH`\n\n### Unix (Linux, MacOS)\n\nUsing [vim-plug](https://github.com/junegunn/vim-plug)\n\n1. Add the following in your `init.vim`\n\n```vim\ncall plug#begin()\nPlug 'codota/tabnine-nvim', { 'do': './dl_binaries.sh' }\ncall plug#end()\n```\n\n2. Restart Neovim and run `:PlugInstall`\n\nUsing [packer](https://github.com/wbthomason/packer.nvim)\n\n1. Add the following in your `init.lua`:\n\n```lua\nrequire(\"packer\").startup(function(use)\n  use { 'codota/tabnine-nvim', run = \"./dl_binaries.sh\" }\nend)\n```\n\n2. Restart Neovim and run `:PackerInstall`\n\nUsing [lazy.nvim](https://github.com/folke/lazy.nvim)\n\n1. Add the following in your `init.lua`:\n\n```lua\nrequire(\"lazy\").setup({\n  { 'codota/tabnine-nvim', build = \"./dl_binaries.sh\" },\n})\n```\n\n2. Restart Neovim and run `:Lazy`\n\n### Windows\n\n\u003c!-- \u003e **Note:**\n\u003e For Please see below for Windows installation instructions --\u003e\n\nThe build script needs a set execution policy.\nHere is an example on how to set it\n\n```Powershell\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n```\n\nFor more information visit\n[the official documentation](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.2)\n\nWindows installations need to be adjusted to utilize PowerShell. This can be accomplished by changing the `do`/`run`/`build` parameter in your plugin manager's configuration from `./dl_binaries.sh` to `pwsh.exe -file .\\\\dl_binaries.ps1`\n\n```Lua\n-- Example using lazy.nvim\n-- pwsh.exe for PowerShell Core\n-- powershell.exe for Windows PowerShell\n\nrequire(\"lazy\").setup({\n  { 'codota/tabnine-nvim', build = \"pwsh.exe -file .\\\\dl_binaries.ps1\" },\n})\n```\n\nIf you need to use Tabnine on Windows and Unix you can change the config as follows\n\n```lua\n-- Get platform dependant build script\nlocal function tabnine_build_path()\n  -- Replace vim.uv with vim.loop if using NVIM 0.9.0 or below\n  if vim.uv.os_uname().sysname == \"Windows_NT\" then\n    return \"pwsh.exe -file .\\\\dl_binaries.ps1\"\n  else\n    return \"./dl_binaries.sh\"\n  end\nend\nrequire(\"lazy\").setup({\n  { 'codota/tabnine-nvim', build = tabnine_build_path()},\n})\n```\n\n---\n\n## Activate (mandatory)\n\nAdd this later in your `init.lua`:\n\n```lua\nrequire('tabnine').setup({\n  disable_auto_comment=true,\n  accept_keymap=\"\u003cTab\u003e\",\n  dismiss_keymap = \"\u003cC-]\u003e\",\n  debounce_ms = 800,\n  suggestion_color = {gui = \"#808080\", cterm = 244},\n  exclude_filetypes = {\"TelescopePrompt\", \"NvimTree\"},\n  log_file_path = nil, -- absolute path to Tabnine log file\n  ignore_certificate_errors = false,\n  -- workspace_folders = {\n  --   paths = { \"/your/project\" },\n  --   get_paths = function()\n  --       return { \"/your/project\" }\n  --   end,\n  -- },\n})\n```\n\n`init.vim` users - the activation script is `lua` code. Make sure to have it inside `lua` block:\n\n```vim\nlua \u003c\u003cEOF\n\" activate tabnine here\nEOF\n```\n\n### Advanced use cases:\n\nYou can set `accept_keymap` and `dismiss_keymap` to `false` to disable them, then you can create mappings using `require('tabnine.keymaps')`\n\n```lua\n--- Example integration with Tabnine and LuaSnip; falling back to inserting tab if neither has a completion\nvim.keymap.set(\"i\", \"\u003ctab\u003e\", function()\n  if require(\"tabnine.keymaps\").has_suggestion() then\n    return require(\"tabnine.keymaps\").accept_suggestion()\n  elseif require(\"luasnip\").jumpable(1) then\n    return require(\"luasnip\").jump(1)\n  else\n    return \"\u003ctab\u003e\"\n  end\nend, { expr = true })\n```\n\n## Activate Tabnine Pro\n\n- `:TabnineHub` - to open Tabnine Hub and log in to your account\n- `:TabnineLoginWithAuthToken` - to log in using auth token (for headless environments, where no browser is available)\n\nSometimes Tabnine may fail to open the browser on Tabnine Hub, in this case use `:TabnineHubUrl` to get Tabnine Hub URL\n\n## Tabnine Chat\n![Tabnine Neovim chat](https://github.com/codota/tabnine-nvim/blob/master/examples/lua-chat.gif)\nTabnine chat needs a webview to run, to use it:\n- You will need to build the chat from source, by executing: `cargo build --release` inside `chat/` directory.\n- You may be missing some dependencies to build the chat. To fix this, run the following command:\n```shell\n$ # Debian/Ubuntu\n$ sudo apt-get install -y libgtk-3-dev libglib2.0-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev\n$ # Arch\n$ pacman -S --needed gtk3 glib2 webkit2gtk-4.1 libsoup3\n```\n\n## Commands\n\n- `:TabnineStatus` - to print Tabnine status\n- `:TabnineDisable` - to disable Tabnine\n- `:TabnineEnable` - to enable Tabnine\n- `:TabnineToggle` - to toggle enable/disable\n- `:TabnineChat` - to launch Tabnine chat\n- `:TabnineLoginWithAuthToken` - to log in using auth token (for headless environments, where no browser is available)\n- `:TabnineAccept` - accept apply changes\n- `:TabnineReject` - reject apply changes\n\n### Tabnine Chat commands\n- `:TabnineChat` - to open Tabnine Chat\n- `:TabnineFix` - to fix the function in scope\n- `:TabnineTest` - to generate tests for function in scope\n- `:TabnineExplain` - to explain the function in scope\n- `:TabnineAccept` - accept apply changes\n- `:TabnineReject` - reject apply changes\n\n## `\u003cTab\u003e` and `nvim-cmp`\n\n`nvim-cmp` maps `\u003cTab\u003e` to navigating through pop menu items (see [here](https://github.com/hrsh7th/nvim-cmp/blob/777450fd0ae289463a14481673e26246b5e38bf2/lua/cmp/config/mapping.lua#L86)) This conflicts with Tabnine `\u003cTab\u003e` for inline completion. To get this sorted you can either:\n\n- Bind Tabnine inline completion to a different key using `accept_keymap`\n- Bind `cmp.select_next_item()` \u0026 `cmp.select_prev_item()` to different keys, e.g: `\u003cC-k\u003e` \u0026 `\u003cC-j\u003e`\n\n## lualine integration\n\nThis plugin exposes a lualine `tabnine` component. e.g:\n\n```lua\nrequire('lualine').setup({\n    tabline = {\n        lualine_a = {},\n        lualine_b = {'branch'},\n        lualine_c = {'filename'},\n        lualine_x = {},\n        lualine_y = {},\n        lualine_z = {}\n    },\n    sections = {lualine_c = {'lsp_progress'}, lualine_x = {'tabnine'}}\n})\n```\n\n## Other statusline integrations\n\nTo render tabnine status widget use:\n\n```lua\nrequire('tabnine.status').status()\n```\n\n## Tabnine Enterprise customers (self hosted only)\n\nIn your `init.lua`:\n\n_these instructions are made for packer, but are pretty much the same with all package managers_\n\n```lua\nlocal tabnine_enterprise_host = \"https://tabnine.customer.com\"\n\nrequire(\"packer\").startup(function(use)\n  use { 'codota/tabnine-nvim', run = \"./dl_binaries.sh \" .. tabnine_enterprise_host .. \"/update\" }\nend)\n\nrequire('tabnine').setup({\n  disable_auto_comment=true,\n  accept_keymap=\"\u003cTab\u003e\",\n  dismiss_keymap = \"\u003cC-]\u003e\",\n  debounce_ms = 800,\n  suggestion_color = {gui = \"#808080\", cterm = 244},\n  codelens_color = { gui = \"#808080\", cterm = 244 },\n  codelens_enabled = true,\n  exclude_filetypes = {\"TelescopePrompt\", \"NvimTree\"},\n  log_file_path = nil, -- absolute path to Tabnine log file,\n  tabnine_enterprise_host = tabnine_enterprise_host,\n  ignore_certificate_errors = false,\n})\n```\n\n## Keymaps examples\n\n```lua\napi.nvim_set_keymap(\"x\", \"\u003cleader\u003eq\", \"\", { noremap = true, callback = require(\"tabnine.chat\").open })\napi.nvim_set_keymap(\"i\", \"\u003cleader\u003eq\", \"\", { noremap = true, callback = require(\"tabnine.chat\").open })\napi.nvim_set_keymap(\"n\", \"\u003cleader\u003eq\", \"\", { noremap = true, callback = require(\"tabnine.chat\").open })\n```\n","funding_links":[],"categories":["Tab completion"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodota%2Ftabnine-nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodota%2Ftabnine-nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodota%2Ftabnine-nvim/lists"}