diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2024-08-25 16:50:06 +0530 |
---|---|---|
committer | Brahmajit Das <brahmajit.xyz@gmail.com> | 2024-08-25 16:50:06 +0530 |
commit | c873020aa2c3eb09fe8769f49afaf62e4c18f711 (patch) | |
tree | 8288d22c19a727c0873c0f6ac8a7f51f96426104 | |
parent | 721e345ecedc54042f54a9eaa9950161e91cdb87 (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.lua | 31 |
1 files changed, 20 insertions, 11 deletions
@@ -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 |