Some Neovim refactoring

This commit is contained in:
Kian Kasad 2025-06-25 20:54:34 -07:00 committed by GitHub
parent 9890935c2b
commit 91d7886feb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,16 +3,10 @@
-- --
-- Get hostname -- Get hostname
local handle = io.popen("hostname") local hostname = vim.fn.hostname()
local hostname = handle:read("*a") or ""
handle:close()
hostname = hostname:gsub("%s+", "") hostname = hostname:gsub("%s+", "")
vim.g.hostname = hostname vim.g.hostname = hostname
if string.match(hostname, "cs.purdue.edu") then vim.g.is_purdue = string.match(hostname, "cs.purdue.edu") ~= nil
vim.g.is_purdue = true
else
vim.g.is_purdue = false
end
-- add required things to path -- add required things to path
if vim.g.is_purdue then if vim.g.is_purdue then
@ -44,7 +38,7 @@ vim.api.nvim_create_autocmd("BufWritePre", {
-- File IO can be slow and this might help idk -- File IO can be slow and this might help idk
if vim.g.is_purdue then if vim.g.is_purdue then
vim.cmd("set noundofile") -- i forgor how to do this in lua so i didnt vim.o.undofile = false
end end