diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e4c5bf26 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "nerdtree"] + path = share/nvim/site/pack/matthewtodd/start/nerdtree + url = https://github.com/preservim/nerdtree diff --git a/README.md b/README.md new file mode 100644 index 00000000..a2f2a909 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +## Neovim Plugins + +### Adding + +``` +# Add the plugin as a submodule in our package. +git submodule add --name nerdtree \ + https://github.com/preservim/nerdtree \ + share/nvim/site/pack/matthewtodd/start/nerdtree +``` + +### Tracking a Different Branch + +``` +git config -f .gitmodules submodule.nerdtree.branch stable +``` + +### Updating + +``` +./install +``` + +### Removing + +``` +# Via https://git-scm.com/docs/gitsubmodules +# +# Deleted submodule: A submodule can be deleted by running +# `git rm && git commit`. This can be undone using git revert. +# +# The deletion removes the superproject’s tracking data, which are both the +# gitlink entry and the section in the .gitmodules file. The submodule’s working +# directory is removed from the file system, but the Git directory is kept around +# as it to make it possible to checkout past commits without requiring fetching +# from another repository. +# +# To completely remove a submodule, manually delete `$GIT_DIR/modules//`. + +git rm share/nvim/site/pack/matthewtodd/start/nerdtree +``` + diff --git a/etc/git/config b/etc/git/config index 5600edb5..11a85a7b 100644 --- a/etc/git/config +++ b/etc/git/config @@ -10,6 +10,9 @@ [diff] algorithm = patience indentHeuristic = true + submodule = log +[fetch] + parallel = 0 [help] autocorrect = 5 [init] @@ -21,6 +24,10 @@ [rebase] autosquash = true autostash = true +[status] + submodulesummary = 1 +[submodule] + recurse = true [url "git@github.com:"] insteadOf = https://github.com/ [user] diff --git a/etc/nvim/init.vim b/etc/nvim/init.vim index e69de29b..68bd1f21 100644 --- a/etc/nvim/init.vim +++ b/etc/nvim/init.vim @@ -0,0 +1,4 @@ +" keyboard shortcuts +let mapleader = ',' +nmap d :NERDTreeToggle +nmap f :NERDTreeFind diff --git a/install b/install index a222a45b..764a4e4d 100755 --- a/install +++ b/install @@ -64,6 +64,7 @@ fish -c "BUNDLE_PATH='${XDG_DATA_HOME}/vim' bundle update --gemfile=${DIR}/share fish -c 'vim +PlugUpgrade +PlugClean +PlugUpdate +qall' +fish -c "git submodule update --init --remote" fish -c "mkdir -p '${XDG_DATA_HOME}/nvim'" fish -c "ln -sfh ${DIR}/share/nvim/site '${XDG_DATA_HOME}/nvim/site'" diff --git a/share/nvim/site/pack/matthewtodd/start/nerdtree b/share/nvim/site/pack/matthewtodd/start/nerdtree new file mode 160000 index 00000000..0e71462f --- /dev/null +++ b/share/nvim/site/pack/matthewtodd/start/nerdtree @@ -0,0 +1 @@ +Subproject commit 0e71462f90fb4bd09121eeba829512cc24ab5c97