skip heavyweight plugins on termux

This commit is contained in:
2026-09-14 07:47:18 -04:00
parent 4131ac8e93
commit 5623db1090
2 changed files with 45 additions and 31 deletions
+12 -4
View File
@@ -7,12 +7,22 @@ end
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
-- Skip heavyweight plugins (LSP completion, treesitter) on resource-constrained
-- environments like Termux, where they're slow/flaky to install and build and
-- generally unnecessary for quick edits. Termux sets $TERMUX_VERSION natively.
local is_termux = os.getenv('TERMUX_VERSION') ~= nil
vim.g.is_termux = is_termux
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- LSP / COMPLETION --
use {'neoclide/coc.nvim', branch = "release"}
if not is_termux then
-- LSP / COMPLETION --
use {'neoclide/coc.nvim', branch = "release"}
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
end
-- automatically adjust tab based on current file
use 'tpope/vim-sleuth'
@@ -25,8 +35,6 @@ return require('packer').startup(function(use)
use 'lukas-reineke/indent-blankline.nvim'
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then