[nvim] Call addGitTopLevelDirectoryToRuntimePath after sourcing common vimrc

This commit is contained in:
Eryn Wells 2024-10-09 09:50:05 -07:00
parent 0a3dd9451a
commit 202dfdb886

View file

@ -14,6 +14,8 @@ function gitTopLevelDirectory()
return gitRepoTopLevelDirectoryPath return gitRepoTopLevelDirectoryPath
end 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() function addGitTopLevelDirectoryToRuntimePath()
local gitTopLevelPath = gitTopLevelDirectory() local gitTopLevelPath = gitTopLevelDirectory()
if gitTopLevelPath == nil or string.len(gitTopLevelPath) == 0 then if gitTopLevelPath == nil or string.len(gitTopLevelPath) == 0 then
@ -39,13 +41,13 @@ function addGitTopLevelDirectoryToRuntimePath()
end end
end end
addGitTopLevelDirectoryToRuntimePath()
vim.cmd [[ vim.cmd [[
source ~/.vimrc.common source ~/.vimrc.common
source ~/.vim/plugins.vim source ~/.vim/plugins.vim
]] ]]
addGitTopLevelDirectoryToRuntimePath()
require 'autocommands' require 'autocommands'
require 'colors' require 'colors'
require 'configuration' require 'configuration'