-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·78 lines (65 loc) · 2.4 KB
/
setup.sh
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
#!/bin/bash
prefix=""
if (( $EUID != 0))
then
prefix="sudo"
fi
$prefix apt update
$prefix apt install -y build-essential \
git \
gcc \
g++ \
git \
wget \
xclip \
libstdc++6 \
python3.12-venv
# Download node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
# Install neovim and tree-sitter-cli
mkdir -p ~/.local/bin/ && \
cd ~/.local/bin/ && \
wget https://github.com/neovim/neovim/releases/download/stable/nvim.appimage && \
wget https://github.com/tree-sitter/tree-sitter/releases/download/v0.20.8/tree-sitter-linux-x64.gz && \
gunzip tree-sitter-linux-x64.gz && \
mv tree-sitter-linux-x64 tree-sitter && \
chmod +x tree-sitter && \
chmod +x nvim.appimage && \
./nvim.appimage --appimage-extract && \
ln -s $PWD/squashfs-root/AppRun $PWD/nvim && \
echo "export PATH=\"$HOME/.local/bin:$PATH\"" >> ~/.bashrc
. ~/.bashrc
# Create config dir for neovim and get my configs.
mkdir -p ~/.config/nvim && \
cd ~/.config/nvim && \
git clone https://github.com/heloint/nvim_backup && \
cp ./nvim_backup/init.lua . && \
cp -r ./nvim_backup/lua .
cp -r ./nvim_backup/colors .
# Install Fura Nerdfont (optional, not all environment will have support for icons)
mkdir -p ~/.local/share/fonts/
cp ./nvim_backup/fonts/fura-mono-regular-nerd-font-complete.otf ~/.local/share/fonts/
fc-cache -fv
setfont fura-mono-regular-nerd-font-complete.otf
# Install pylsp 3th parties (Mypy, Black, etc..)
python3 -m venv $HOME/venv && \
echo "[ -f ~/venv/bin/activate ] && source ~/venv/bin/activate" >> ~/.bashrc
. ~/.bashrc
pip install --upgrade pip
pip install "python-lsp-server[all]"
pip install python-lsp-isort
pip install pylsp-mypy
pip install python-lsp-black
# Install ripgrep
cd ~ && \
wget https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz && \
tar xvf ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz && \
cp ripgrep-13.0.0-x86_64-unknown-linux-musl/rg ~/.local/bin && \
rm -r ripgrep-13.0.0-x86_64-unknown-linux-musl.tar.gz ripgrep-13.0.0-x86_64-unknown-linux-musl
# Install node and npm
. ~/.bashrc \
&& nvm install node \
&& nvm install-latest-npm \
&& ln -s $(which npm) ~/.local/bin/npm \
&& ln -s $(which node) ~/.local/bin/node \
&& . ~/.bashrc