[nvim] Fix the merge conflicts (again) in the nvim config files
This commit is contained in:
parent
24229b0711
commit
eeeb516897
2 changed files with 20 additions and 14 deletions
|
@ -1,31 +1,42 @@
|
||||||
-- Eryn Wells <eryn@erynwells.me>
|
-- Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
vim.opt.runtimepath:prepend "~/.vim"
|
|
||||||
|
|
||||||
vim.cmd [[
|
vim.cmd [[
|
||||||
source ~/.vimrc.common
|
source ~/.vimrc.common
|
||||||
source ~/.vim/plugins.vim
|
source ~/.vim/plugins.vim
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
require 'os'
|
||||||
|
|
||||||
require 'configuration'
|
require 'configuration'
|
||||||
require 'colors'
|
require 'colors'
|
||||||
require 'keys'
|
require 'keys'
|
||||||
require 'os'
|
|
||||||
|
|
||||||
function ensureMetadataDirectoriesExist()
|
function ensureMetadataDirectoriesExist()
|
||||||
local paths = {
|
local options = {
|
||||||
vim.opt.backupdir:get(),
|
vim.opt.backupdir:get(),
|
||||||
vim.opt.directory:get(),
|
vim.opt.directory:get(),
|
||||||
vim.opt.undodir:get(),
|
vim.opt.undodir:get(),
|
||||||
vim.fs.dirname(vim.opt.shadafile:get()),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, opt in ipairs(paths) do
|
local function makeDirectory(path)
|
||||||
local firstPath = opt[1]
|
os.execute("mkdir", "-p", path)
|
||||||
if string.find(firstPath, "//$") then
|
end
|
||||||
os.execute("mkdir", "-p", firstPath)
|
|
||||||
|
for _, opt in ipairs(options) do
|
||||||
|
for _, path in ipairs(opt) do
|
||||||
|
if string.find(path, "//$") then
|
||||||
|
makeDirectory(path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- The shadafile option is a single option but get() returns a table, so
|
||||||
|
-- iterate it just to be safe.
|
||||||
|
local shadaFile = vim.opt.shadafile:get()
|
||||||
|
for _, path in ipairs(shadaFile) do
|
||||||
|
local shadaFileDirectory = vim.fs.dirname(path)
|
||||||
|
makeDirectory(shadaFileDirectory)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ensureMetadataDirectoriesExist()
|
ensureMetadataDirectoriesExist()
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
-- Eryn Wells <eryn@erynwells.me>
|
-- Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
require 'os'
|
|
||||||
|
|
||||||
>>>>>>> 298c137 ([nvim] Fix the editor metadata settings, again, for hopefully the last time)
|
|
||||||
-- [[ Editor Confguration ]]
|
-- [[ Editor Confguration ]]
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue