mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
refactor
This commit is contained in:
parent
c1f323fe2f
commit
a168d0551e
1 changed files with 2 additions and 11 deletions
|
|
@ -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,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue