From b57784ac53ad26a36ffb247dc7baafd71c5af12d Mon Sep 17 00:00:00 2001 From: rootiest Date: Sat, 23 Nov 2024 14:19:12 -0500 Subject: [PATCH] feat: add architecture detection to disable incompatible plugins --- lua/config/postopts.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/config/postopts.lua b/lua/config/postopts.lua index 5d97055..ab857be 100644 --- a/lua/config/postopts.lua +++ b/lua/config/postopts.lua @@ -19,3 +19,13 @@ if prefix ~= nil then vim.g.useavante = false end end + +-- Define intel_arch +local intel_arch = { x64 = true, x86 = true } +local cur_arch = require('data.func').get_system_arch() + +-- Check the platform and disable incompatible plugins +if not intel_arch[cur_arch] then + vim.g.useimage = false + vim.g.useavante = false +end