Tabnine
info
You can enable the extra with the :LazyExtras
command.
Plugins marked as optional will only be configured if they are installed.
Below you can find a list of included plugins and their default settings.
caution
You don't need to copy the default settings to your config. They are only shown here for reference.
cmp-tabnine
Tabnine cmp source
- Options
- Full Spec
opts = {
max_lines = 1000,
max_num_results = 3,
sort = true,
}
{
"tzachar/cmp-tabnine",
build = LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
opts = {
max_lines = 1000,
max_num_results = 3,
sort = true,
},
config = function(_, opts)
require("cmp_tabnine.config"):setup(opts)
end,
}
cmp-tabnine
- Options
- Full Spec
opts = nil
{ "tzachar/cmp-tabnine" }
cmp-tabnine
- Options
- Full Spec
opts = nil
{ "tzachar/cmp-tabnine", "saghen/blink.compat" }
blink.compat
- Options
- Full Spec
opts = nil
"saghen/blink.compat"
nvim-cmp (optional)
- Options
- Full Spec
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "cmp_tabnine",
group_index = 1,
priority = 100,
})
opts.formatting.format = LazyVim.inject.args(opts.formatting.format, function(entry, item)
-- Hide percentage in the menu
if entry.source.name == "cmp_tabnine" then
item.menu = ""
end
end)
end
{
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { "tzachar/cmp-tabnine" },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "cmp_tabnine",
group_index = 1,
priority = 100,
})
opts.formatting.format = LazyVim.inject.args(opts.formatting.format, function(entry, item)
-- Hide percentage in the menu
if entry.source.name == "cmp_tabnine" then
item.menu = ""
end
end)
end,
}
blink.cmp (optional)
- Options
- Full Spec
opts = {
sources = {
compat = { "cmp_tabnine" },
providers = {
cmp_tabnine = {
kind = "TabNine",
score_offset = 100,
async = true,
},
},
},
}
{
"saghen/blink.cmp",
optional = true,
dependencies = { "tzachar/cmp-tabnine", "saghen/blink.compat" },
opts = {
sources = {
compat = { "cmp_tabnine" },
providers = {
cmp_tabnine = {
kind = "TabNine",
score_offset = 100,
async = true,
},
},
},
},
}
lualine.nvim (optional)
Show TabNine status in lualine
- Options
- Full Spec
opts = function(_, opts)
local icon = LazyVim.config.icons.kinds.TabNine
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("cmp_tabnine", icon))
end
{
"nvim-lualine/lualine.nvim",
optional = true,
event = "VeryLazy",
opts = function(_, opts)
local icon = LazyVim.config.icons.kinds.TabNine
table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("cmp_tabnine", icon))
end,
}