[nvim] Call addGitTopLevelDirectoryToRuntimePath after sourcing common vimrc
This commit is contained in:
		
							parent
							
								
									0a3dd9451a
								
							
						
					
					
						commit
						202dfdb886
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -14,6 +14,8 @@ function gitTopLevelDirectory()
 | 
			
		|||
    return gitRepoTopLevelDirectoryPath
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Enable per-project (per-git repository) customization of (neo)vim by looking
 | 
			
		||||
-- for .vim and .nvim directories in the root of the git repository.
 | 
			
		||||
function addGitTopLevelDirectoryToRuntimePath()
 | 
			
		||||
    local gitTopLevelPath = gitTopLevelDirectory()
 | 
			
		||||
    if gitTopLevelPath == nil or string.len(gitTopLevelPath) == 0 then
 | 
			
		||||
| 
						 | 
				
			
			@ -39,13 +41,13 @@ function addGitTopLevelDirectoryToRuntimePath()
 | 
			
		|||
    end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
addGitTopLevelDirectoryToRuntimePath()
 | 
			
		||||
 | 
			
		||||
vim.cmd [[
 | 
			
		||||
    source ~/.vimrc.common
 | 
			
		||||
    source ~/.vim/plugins.vim
 | 
			
		||||
]]
 | 
			
		||||
 | 
			
		||||
addGitTopLevelDirectoryToRuntimePath()
 | 
			
		||||
 | 
			
		||||
require 'autocommands'
 | 
			
		||||
require 'colors'
 | 
			
		||||
require 'configuration'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue