feat: check OS and disable tabnine on linux aarch64

This commit is contained in:
Thomas Alcala Schneider 2023-11-13 15:06:54 +01:00
parent d09205f6e6
commit 8cca88e4e2
4 changed files with 70 additions and 32 deletions

View file

@ -1,5 +1,18 @@
local uname = vim.loop.os_uname()
local sysname = uname.sysname
local machine = uname.machine
local enableCmpTabnine = true
-- Check if the system is Linux and the machine is aarch64
if sysname == "Linux" and machine == "aarch64" then
-- Disable cmp-tabnine plugin
enableCmpTabnine = false
end
return {
'tzachar/cmp-tabnine',
enabled = enableCmpTabnine,
build = './install.sh',
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()

View file

@ -1 +1,17 @@
return { 'Exafunction/codeium.vim' }
local uname = vim.loop.os_uname()
local sysname = uname.sysname
local machine = uname.machine
local enableCodeium = true
-- Check if the system is Linux and the machine is aarch64
if sysname == "Linux" and machine == "aarch64" then
-- Disable cmp-tabnine plugin
enableCodeium = false
end
return {
'Exafunction/codeium.vim',
enabled = enableCodeium
}

View file

@ -1,5 +1,18 @@
local uname = vim.loop.os_uname()
local sysname = uname.sysname
local machine = uname.machine
local enableTabnine = true
-- Check if the system is Linux and the machine is aarch64
if sysname == "Linux" and machine == "aarch64" then
-- Disable cmp-tabnine plugin
enableTabnine = false
end
return {
'codota/tabnine-nvim',
enabled = enableTabnine,
build = './dl_binaries.sh',
config = function()
require('tabnine').setup {