-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (55 loc) · 2.15 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
DOTFILES=$(shell pwd)
ZSH_COMPLETIONS=~/.zsh/completions
ZSH_THEMES=~/.zsh/themes
XDG_CONFIG_DIR=~/.config
install: zsh nvim tmux git psqlrc zsh-cli-tools cli-tools-opt
zsh:
mkdir -p $(ZSH_THEMES)
install/ln-safe.sh $(DOTFILES)/agnoster.zsh $(ZSH_THEMES)/agnoster.zsh
install/ln-safe.sh $(DOTFILES)/.zshrc $${HOME}/.zshrc
nvim-py-formatting:
pip install ruff
pip install pynvim
pip install pyright
nvim: nvim-py-formatting
mkdir -p $(XDG_CONFIG_DIR)/nvim
install/ln-safe.sh $(DOTFILES)/init.lua $(XDG_CONFIG_DIR)/nvim/init.lua
install/package.sh lua5.1 lua
vim:
install/ln-safe.sh $(DOTFILES)/.vimrc $${HOME}/.vimrc
tmux:
install/ln-safe.sh $(DOTFILES)/.tmux.conf $${HOME}/.tmux.conf
git: delta
install/ln-safe.sh $(DOTFILES)/.gitconfig $${HOME}/.gitconfig
install/ln-safe.sh $(DOTFILES)/.gitignore_global $${HOME}/.gitignore_global
psqlrc:
install/ln-safe.sh $(DOTFILES)/.psqlrc $${HOME}/.psqlrc
# CLI tools that are used in zsh config
zsh-cli-tools: bat exa fd $(ZSH_COMPLETIONS)/_rustup $(ZSH_COMPLETIONS)/_cargo
cli-tools-opt: tldr rg httpie
rust-toolchain:
cargo -V > /dev/null || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh;
cargo -V > /dev/null || . $${HOME}/.cargo/env
$(ZSH_COMPLETIONS)/_rustup: rust-toolchain
mkdir -p $(ZSH_COMPLETIONS)
rustup completions zsh rustup > $(ZSH_COMPLETIONS)/_rustup
$(ZSH_COMPLETIONS)/_cargo: rust-toolchain
mkdir -p $(ZSH_COMPLETIONS)
rustup completions zsh cargo > $(ZSH_COMPLETIONS)/_cargo
# Various rust command line utilities
bat: rust-toolchain
bat --version > /dev/null || install/rust-cli-tool.sh bat bat bat
exa: rust-toolchain
exa --version > /dev/null || cargo install exa
fd: rust-toolchain
fd --version > /dev/null || install/rust-cli-tool.sh fd-find fd fd-find
delta: rust-toolchain
delta --version > /dev/null || install/rust-cli-tool.sh git-delta git-delta git-delta
tldr: rust-toolchain
tldr --version > /dev/null || cargo install tealdeer
mkdir -p $(XDG_CONFIG_DIR)/tealdeer
install/ln-safe.sh $(DOTFILES)/tealdeer/config.toml $(XDG_CONFIG_DIR)/tealdeer/config.toml
rg: rust-toolchain
rg -V > /dev/null || install/rust-cli-tool.sh ripgrep ripgrep ripgrep
httpie:
pip install httpie