[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>
 | 
			
		||||
 | 
			
		||||
vim.opt.runtimepath:prepend "~/.vim"
 | 
			
		||||
 | 
			
		||||
vim.cmd [[
 | 
			
		||||
    source ~/.vimrc.common
 | 
			
		||||
    source ~/.vim/plugins.vim 
 | 
			
		||||
]]
 | 
			
		||||
 | 
			
		||||
require 'os'
 | 
			
		||||
 | 
			
		||||
require 'configuration'
 | 
			
		||||
require 'colors'
 | 
			
		||||
require 'keys'
 | 
			
		||||
require 'os'
 | 
			
		||||
 | 
			
		||||
function ensureMetadataDirectoriesExist()
 | 
			
		||||
    local paths = {
 | 
			
		||||
    local options = {
 | 
			
		||||
        vim.opt.backupdir:get(),
 | 
			
		||||
        vim.opt.directory:get(),
 | 
			
		||||
        vim.opt.undodir:get(),
 | 
			
		||||
        vim.fs.dirname(vim.opt.shadafile:get()),
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for _, opt in ipairs(paths) do
 | 
			
		||||
        local firstPath = opt[1]
 | 
			
		||||
        if string.find(firstPath, "//$") then
 | 
			
		||||
            os.execute("mkdir", "-p", firstPath)
 | 
			
		||||
    local function makeDirectory(path)
 | 
			
		||||
        os.execute("mkdir", "-p", path)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    for _, opt in ipairs(options) do
 | 
			
		||||
        for _, path in ipairs(opt) do
 | 
			
		||||
            if string.find(path, "//$") then
 | 
			
		||||
                makeDirectory(path)
 | 
			
		||||
            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
 | 
			
		||||
 | 
			
		||||
ensureMetadataDirectoriesExist()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,10 +1,5 @@
 | 
			
		|||
-- Eryn Wells <eryn@erynwells.me>
 | 
			
		||||
 | 
			
		||||
<<<<<<< HEAD
 | 
			
		||||
=======
 | 
			
		||||
require 'os'
 | 
			
		||||
 | 
			
		||||
>>>>>>> 298c137 ([nvim] Fix the editor metadata settings, again, for hopefully the last time)
 | 
			
		||||
-- [[ Editor Confguration ]]
 | 
			
		||||
local opt = vim.opt
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue