-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
88 lines (72 loc) · 2.29 KB
/
install.sh
File metadata and controls
88 lines (72 loc) · 2.29 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/sh
# install dotfiles
set -eux
GITHUB="https://github.com/"
_get_repo() {
local _basedir="$1"
local _repo="$2"
local _ref="${3:-}" # optional
local _repodir="$(basename "$_repo")"
mkdir -p "$_basedir"
[ -d "$_basedir"/"$_repodir" ] || env -C "$_basedir" git clone --origin=upstream "$_repo" "$_repodir"
git -C "$_basedir"/"$_repodir" fetch --all
if [ "$_ref" ]; then
git -C "${_basedir}/${_repodir}" checkout "$_ref"
fi
}
firefox() {
(
cd "$HOME/.mozilla/firefox" || return
[ -r ./profiles.ini ] || return
for profile_path in $(grep Path profiles.ini | cut -d= -f2-); do
echo "install firefox profile: $profile_path"
ln -s "$HOME/user.js" "./$profile_path/user.js"
mkdir -p "./$profile_path/chrome"
ln -s "$HOME/userContent.css" "./$profile_path/chrome/userContent.css"
done
)
}
nvim() {
_plugindir="$HOME/.local/share/nvim/site/pack/plugins/start"
mkdir -p "$_plugindir"
# these should be tracked submodules in the future
_get_repo "$_plugindir" "$GITHUB/neovim/nvim-lspconfig"
_get_repo "$_plugindir" "$GITHUB/nvim-treesitter/nvim-treesitter-context"
_get_repo "$_plugindir" "$GITHUB/tpope/vim-commentary"
_get_repo "$_plugindir" "$GITHUB/tpope/vim-surround"
_get_repo "$_plugindir" "$GITHUB/tpope/vim-unimpaired"
# disabled in favor of lsp -- _get_repo "$_plugindir" "$GITHUB/vim-autoformat/vim-autoformat"
# - DAP
_get_repo "$_plugindir" "$GITHUB/mfussenegger/nvim-dap"
_get_repo "$_plugindir" "$GITHUB/rcarriga/nvim-dap-ui"
_get_repo "$_plugindir" "$GITHUB/nvim-neotest/nvim-nio" # dep of nvim-dap-ui
_get_repo "$_plugindir" "$GITHUB/theHamsta/nvim-dap-virtual-text"
# - DAP languages
_get_repo "$_plugindir" "$GITHUB/leoluz/nvim-dap-go"
_get_repo "$_plugindir" "$GITHUB/mfussenegger/nvim-dap-python"
_get_repo "$_plugindir" "$GITHUB/nvim-treesitter/nvim-treesitter-context"
_get_repo "$_plugindir" "$GITHUB/morhetz/gruvbox"
}
lsp() {
# pipx install --include-deps "python-lsp-server[all]"
pipx install python-lsp-server
pipx inject python-lsp-server \
pylsp-mypy \
python-lsp-isort \
python-lsp-black \
pyls-memestra \
pylsp-rope \
pylint \
pylint-pytest \
debugpy
# pylint-venv
pipx install poetry
pipx inject poetry keyring_pass
}
cd "$HOME"
firefox
nvim
lsp
pipx install black
pipx install pylint
pipx inject pylint pylint-venv pylint-pytest