mirror of
https://github.com/gyoder/dots.git
synced 2026-02-27 17:03:45 +00:00
Some Neovim refactoring
This commit is contained in:
parent
9890935c2b
commit
91d7886feb
1 changed files with 3 additions and 9 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue