mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix: limit to top 3 sources for TabNine
This commit is contained in:
parent
7adf96bb2d
commit
1557eaa2ea
1 changed files with 12 additions and 4 deletions
|
|
@ -1,14 +1,22 @@
|
||||||
return {
|
return {
|
||||||
|
-- Tabnine cmp source
|
||||||
{
|
{
|
||||||
"nvim-cmp",
|
"nvim-cmp",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Add TabNine source, make sure you run :CmpTabnineHub after installation.
|
-- Add TabNine support, make sure you run :CmpTabnineHub after installation.
|
||||||
{
|
{
|
||||||
"tzachar/cmp-tabnine",
|
"tzachar/cmp-tabnine",
|
||||||
build = "./install.sh",
|
build = "./install.sh",
|
||||||
dependencies = "hrsh7th/nvim-cmp",
|
dependencies = "hrsh7th/nvim-cmp",
|
||||||
-- Only limit top 3 sources, refer https://github.com/tzachar/cmp-tabnine?tab=readme-ov-file#setup
|
-- Only limit top 3 suggestions from Tabnine
|
||||||
opts = { max_lines = 1000, max_num_results = 3, sort = true },
|
config = function()
|
||||||
|
local tabnine = require("cmp_tabnine.config")
|
||||||
|
tabnine:setup({
|
||||||
|
max_lines = 1000,
|
||||||
|
max_num_results = 3,
|
||||||
|
sort = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@param opts cmp.ConfigSchema
|
---@param opts cmp.ConfigSchema
|
||||||
|
|
@ -20,7 +28,7 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
-- Show TabNine status in lualine
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
optional = true,
|
optional = true,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue