-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (58 loc) · 1.78 KB
/
Makefile
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
.PHONY: init
init: ## 初始化安裝配置 neovim
brew install universal-ctags cmake neovim
mkdir -p $(HOME)/.config/nvim
ln -nsiF $(PWD)/vimrc.bootstrap $(HOME)/.config/nvim/init.vim
ln -nsiF $(PWD)/vimrc.local $(HOME)/.config/nvim/local_init.vim
ln -nsiF $(PWD)/vimrc.local.bundles $(HOME)/.config/nvim/local_bundles.vim
$(MAKE) plugin
nvim -c checkhealth
.PHONY: ruby
ruby: ## 配置搭配的 Ruby 環境
which ruby
gem install neovim solargraph
.PHONY: nodejs
nodejs: ## 配置搭配的 NodeJS 環境
which node
npm install -g neovim
.PHONY: python
python: ## 配置搭配的 python 環境
brew install python pipx
python3 -m pip install --user --upgrade --break-system-packages pynvim jedi
pipx install flake8
.PHONY: plugin
plugin: ## 安裝 vim 外掛
nvim -c 'PlugInstall'
nvim -c 'PlugClean'
nvim -c 'CocInstall coc-tabnine coc-tsserver'
nvim -c 'CocInstall \
coc-css \
coc-emmet \
coc-git \
coc-gocode \
coc-highlight \
coc-html \
coc-jedi \
coc-json \
coc-lists \
coc-pairs \
coc-phpls \
coc-snippets \
coc-solargraph \
coc-ultisnips \
coc-vetur \
coc-yaml \
coc-yank'
cp -iv snippets/* $(HOME)/.config/coc/ultisnips/
.PHONY: delete
delete: ## 移除現有配置
rm -rf $(HOME)/.vim
rm -vf $(HOME)/.vimrc
rm -vf $(HOME)/.vimrc.local
rm -vf $(HOME)/.vimrc.local.bundles
rm -rf $(HOME)/.config/nvim
# Absolutely awesome: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help