-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
61 lines (49 loc) · 2.43 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
T_BOLD=$(shell tput bold)
T_NORMAL=$(shell tput sgr0)
NVIM_CONFIG_DIR=$(HOME)/.config/nvim
CURRENT_DIR=$(abspath $(shell pwd))
.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
install: install-symlinks install-node install-python install-ruby install-coc post-install-msg ## Install all.
@echo "$(T_BOLD)---> Downloading vim-plug$(T_NORMAL)"
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@echo "$(T_BOLD)**** RUN THIS WHEN YOU FIRST TIME OPEN NVIM ****$(T_NORMAL)"
@echo " :Mkspell - To generate spell files."
@echo " :UpdateRemotePlugins - To update python remote plugins."
@echo " :CocInstall -sync coc-go"
@echo " :checkhealth - To check health."
@echo " :PlugUpgrade - to upgrade vim-plug.."
@echo " :PlugUpdate - to install/update dependencies."
@echo " :PlugStatus - to see if the dependencies are installed correctly."
install-symlinks: ## Install symlinks.
@echo "$(T_BOLD)---> Setting up symlink$(T_NORMAL)"
mkdir -p $(shell dirname $(NVIM_CONFIG_DIR))
[[ -h $(NVIM_CONFIG_DIR) ]] && [[ "$(shell readlink $(NVIM_CONFIG_DIR))" == "$(CURRENT_DIR)" ]] || ln -s $(CURRENT_DIR) $(NVIM_CONFIG_DIR)
install-python: ## Install pynvim.
@echo "$(T_BOLD)---> Installing python libraries$(T_NORMAL)"
#pip2 install --upgrade pip
pip3 install --upgrade pip
#pip2 install --upgrade --user pynvim
pip3 install --upgrade --user pynvim
install-ruby: ## Install neovim for ruby.
@echo "$(T_BOLD)---> Installing ruby libraries$(T_NORMAL)"
gem install --user-install neovim
gem update --user-install neovim
install-node: ## Install neovim for node.
@echo "$(T_BOLD)---> Installing node libraries$(T_NORMAL)"
pnpm install -g neovim
install-coc: ## Install CoC.
@echo "$(T_BOLD)---> Installing coc.nvim$(T_NORMAL)"
@echo "--> Check if node and Go are isntalled"
node --version
go version
@echo "--> Install coc extensions"
go get golang.org/x/tools/gopls
post-install-msg: ## Install stuff that should be run inside nvim.
@echo "Run following inside nvim:"
@echo " :PlugUpgrade"
@echo " :PlugUpdate"
@echo " :UpdateRemotePlugins"
@echo " :CocInstall -sync coc-go coc-snippets"