This commit is contained in:
Folke Lemaitre 2023-10-15 22:40:52 +02:00
parent c1f323fe2f
commit a168d0551e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -1,13 +1,5 @@
local Util = require("lazyvim.util") local Util = require("lazyvim.util")
local function tabnine_build_cmd()
if vim.loop.os_uname().sysname == "Windows_NT" then
return "pwsh -noni .\\install.ps1"
else
return "./install.sh"
end
end
return { return {
-- Tabnine cmp source -- Tabnine cmp source
{ {
@ -16,7 +8,7 @@ return {
-- Add TabNine support, make sure you run :CmpTabnineHub after installation. -- Add TabNine support, make sure you run :CmpTabnineHub after installation.
{ {
"tzachar/cmp-tabnine", "tzachar/cmp-tabnine",
build = tabnine_build_cmd(), build = Util.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh",
dependencies = "hrsh7th/nvim-cmp", dependencies = "hrsh7th/nvim-cmp",
opts = { opts = {
max_lines = 1000, max_lines = 1000,
@ -24,8 +16,7 @@ return {
sort = true, sort = true,
}, },
config = function(_, opts) config = function(_, opts)
local tabnine = require("cmp_tabnine.config") require("cmp_tabnine.config"):setup(opts)
tabnine:setup(opts)
end, end,
}, },
}, },