forked from nviennot/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (55 loc) · 1.6 KB
/
Makefile
File metadata and controls
65 lines (55 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
DOTFILES = $(HOME)/.vimrc $(HOME)/.gvimrc $(HOME)/.vim/coc-settings.json
MINEFILES = vimrc.mine gvimrc.mine
ME ?= example
TARGETS = $(DOTFILES) $(MINEFILES)
SHELL = /bin/bash
CWD = $(shell pwd)
define check_file
@if [[ -e $1 && "$(OVERWRITE)" != "1" ]]; then \
echo "make install won't overwrite $1"; \
echo "1) remove it yourself or 2) use 'make install OVERWRITE=1'"; \
false \
else true; \
fi
endef
all:
@echo type make install.
clearfiles =
ifeq ($(OVERWRITE),1)
clearfiles += clean_mine
endif
clean_mine:
rm -f $(MINEFILES)
%.mine: %.mine.$(ME)
$(call check_file,$@)
@echo Using $(ME) $* file
@cp $< $@
$(HOME)/.%: %
$(call check_file,$@)
ln -fs $(PWD)/$< $@
$(HOME)/.vim/coc-settings.json: coc-settings.json
$(call check_file,$@)
ln -fs $(PWD)/coc-settings.json $@
install: $(clearfiles) $(TARGETS)
@echo "✓ Symlinks created"
@echo "✓ Personal config files (*.mine) created from examples"
@echo "✓ vim-plug will auto-install on first Vim launch"
@echo ""
@echo "Next steps:"
@echo " 1. Open Vim - plugins will install automatically"
@echo " 2. Install language servers: :CocInstall coc-json coc-python coc-tsserver"
@echo ""
@echo "Prerequisites (if not installed):"
@echo " - Node.js 14+: brew install node"
@echo " - fzf: brew install fzf"
@echo " - ripgrep: brew install ripgrep"
@echo ""
@echo "Note: vimrc.mine and gvimrc.mine are optional personal config files"
update:
@echo "Updating vim configuration..."
git pull
@echo ""
@echo "To update plugins, run:"
@echo " vim +PlugUpdate +qa"
@echo " vim +CocUpdate +qa"
.PHONY: install update clean_mine