-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Makefile for bootstrapping my neovim config on machines without access to | ||
# nix. | ||
|
||
SITE_DIR := $(HOME)/.local/share/nvim/site/pack | ||
START_DIR := $(SITE_DIR)/git/start | ||
PLUGINS = | ||
|
||
.PHONY: update | ||
|
||
default: update | ||
|
||
$(SITE_DIR): | ||
mkdir -p $(SITE_DIR) | ||
|
||
# A 'function' for defining a rule that bootstraps a plugin. | ||
define PLUG = | ||
$$(START_DIR)/$1/.git: | ||
git clone $2 $$(subst .git,,$$@) | ||
|
||
PLUGINS += $$(START_DIR)/$1/.git | ||
endef | ||
|
||
|
||
# To see the result of calling 'PLUG', change eval to info | ||
# | ||
# Common dependencies | ||
$(eval $(call PLUG,everforest,https://github.com/neanias/everforest-nvim)) | ||
|
||
# Common dependencies | ||
$(eval $(call PLUG,plenary,https://github.com/nvim-lua/plenary.nvim)) | ||
|
||
|
||
# LSP | ||
$(eval $(call PLUG,nvim-lspconfig,https://github.com/neovim/nvim-lspconfig)) | ||
$(eval $(call PLUG,nvim-cmp,https://github.com/hrsh7th/nvim-cmp)) | ||
$(eval $(call PLUG,cmp-nvim-lsp,https://github.com/hrsh7th/cmp-nvim-lsp)) | ||
|
||
# "Apps" | ||
$(eval $(call PLUG,telescope,https://github.com/nvim-telescope/telescope.nvim)) | ||
$(eval $(call PLUG,toggleterm,https://github.com/akinsho/toggleterm.nvim)) | ||
|
||
update: $(PLUGINS) | ||
@for plug in $^ ; do git -C $${plug%.git} pull; done | ||
|