-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
93 lines (66 loc) · 2.5 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
CONFIG_HOME ?= $(HOME)/.config
FISH_COMPL ?= $(CONFIG_HOME)/fish/completions
install:\
brew\
fish\
julia\
nvim\
rust\
tree-sitter\
wezterm
.PHONY: fish nvim
brew: Brewfile.lock.json
Brewfile.lock.json: Brewfile .brew_install.sh
brew bundle install --cleanup --no-upgrade --file "$<"
.brew_install.sh:
curl -fsSL 'https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh' > $@
type brew || /bin/bash '.brew_install.sh'
fish:
mkdir -pv $(FISH_COMPL)
fish\
-c 'set -U fish_greeting'\
-c 'set -U fish_color_command green'\
-c 'set -U fish_color_comment white'\
-c 'set -U fish_color_param'\
-c 'set -U fish_color_quote blue'\
-c 'set -U __fish_git_prompt_showcolorhints 1'\
-c 'set -U __fish_git_prompt_showdirtystate 1'\
-c 'set -U __fish_git_prompt_color grey'\
-c 'set -U __fish_git_prompt_color_branch bryellow'\
-c 'set -U __fish_git_prompt_color_merging yellow'\
-c 'fish_add_path -U ~/.cargo/bin'\
-c 'fish_add_path -U ~/.deno/bin'\
-c 'fish_add_path -U /usr/local/opt/node@22/bin' # Add node LTS to path manually
PAQ_DIR = "$(HOME)/.local/share/nvim/site/pack/paqs/start/paq-nvim"
nvim: $(HOME)/.editorconfig $(HOME)/.vimrc nvim/lua/plugins.lua
[ -d $(PAQ_DIR) ] || git clone --depth=1 'https://github.com/savq/paq-nvim.git' $(PAQ_DIR)
nvim --headless -u NONE -c 'lua require("plugins").bootstrap()'
$(HOME)/.vimrc:
ln -fhs $(CONFIG_HOME)/nvim/vimrc $@
$(HOME)/.editorconfig:
ln -fhs $(CONFIG_HOME)/.editorconfig $@
julia: $(FISH_COMPL)/juliaup.fish
juliaup add release
$(FISH_COMPL)/juliaup.fish:
juliaup completions fish > $@
rust: rustup-init $(FISH_COMPL)/rustup.fish
rustup update stable
rustup-init:
rustup-init -y
$(FISH_COMPL)/rustup.fish:
rustup completions fish rustup > $@
WEZTERMINFO = wezterm/wezterm.terminfo
WEZTERM_THEMES_URL = https://raw.githubusercontent.com/savq/melange-nvim/refs/heads/master/term/wezterm/
wezterm: $(WEZTERMINFO) $(FISH_COMPL)/wezterm.fish wezterm/colors/melangeDark.toml wezterm/colors/melangeLight.toml
tic -x -o ~/.terminfo $<
wezterm/colors/melangeDark.toml:
curl --create-dirs "$(WEZTERM_THEMES_URL)melange_dark.toml" > $@
wezterm/colors/melangeLight.toml:
curl --create-dirs "$(WEZTERM_THEMES_URL)melange_light.toml" > $@
$(WEZTERMINFO):
curl 'https://raw.githubusercontent.com/wez/wezterm/main/termwiz/data/wezterm.terminfo' > $@
$(FISH_COMPL)/wezterm.fish:
wezterm shell-completion --shell fish > $@
tree-sitter: $(FISH_COMPL)/tree-sitter.fish
$(FISH_COMPL)/tree-sitter.fish:
tree-sitter complete --shell fish > $@