summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2024-08-25 16:50:06 +0530
committerBrahmajit Das <brahmajit.xyz@gmail.com>2024-08-25 16:50:06 +0530
commitc873020aa2c3eb09fe8769f49afaf62e4c18f711 (patch)
tree8288d22c19a727c0873c0f6ac8a7f51f96426104
parent721e345ecedc54042f54a9eaa9950161e91cdb87 (diff)
nvim: init.lua: hostname based configuration
Load the plugins on powerful machines only. Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
-rw-r--r--init.lua31
1 files changed, 20 insertions, 11 deletions
diff --git a/init.lua b/init.lua
index e55a29c..d85f6ea 100644
--- a/init.lua
+++ b/init.lua
@@ -12,20 +12,29 @@ _G.vim.opt_local.path:append(path .. '/lua')
end
_G.vim.opt_local.suffixesadd:prepend('.lua')
+local function get_hostname()
+ local f = io.open("/etc/hostname")
+ local hostname = f:read("*a") or ""
+ f:close()
+ hostname = string.gsub(hostname, "\n$", "")
+ return hostname
+end
-- Load plugins
require('keymaps')
require('basics')
require('ftsettings')
require('appearance')
-require('plugin')
-require('plugins.lualine')
-require('plugins.autopair')
-require('plugins.colorscheme')
-require('plugins.lsp')
-require('plugins.completion')
-require('plugins.gitsigns')
-require('plugins.nvim-tree')
-require('plugins.treesitter')
-require('plugins.usnippet')
-require('plugins.vimtex')
+if get_hostname() ~= "shoggoth" then
+ require('plugin')
+ require('plugins.lualine')
+ require('plugins.autopair')
+ require('plugins.colorscheme')
+ require('plugins.lsp')
+ require('plugins.completion')
+ require('plugins.gitsigns')
+ require('plugins.nvim-tree')
+ require('plugins.treesitter')
+ require('plugins.usnippet')
+ require('plugins.vimtex')
+end