-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathneovim-setup.sh
88 lines (71 loc) · 2.44 KB
/
neovim-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
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
#
# Update package lists
apt-get update && apt-get install -y \
build-essential \
curl \
git \
vim \
zlib1g-dev \
libopenmpi-dev \
ffmpeg \
software-properties-common \
lsb-release \
sed \
tmux \
python3-opengl \
unzip \
wget \
ripgrep \
clangd \
luarocks \
python3-venv
# Set up NodeSource repository and install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
# Clean up
rm -rf /var/lib/apt/lists/*
pip3 install --user matplotlib-backend-wezterm
pip3 install --user pytest
pip3 install --user debugpy
pip3 install --user neovim
# Install neovim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
rm -rf /opt/nvim
tar -C /opt -xzf nvim-linux64.tar.gz
rm nvim-linux64.tar.gz
# Update PATH
echo 'export PATH="$PATH:/opt/nvim-linux64/bin"' >> ~/.bashrc
# Nvim configuration
mkdir -p /root/.config/nvim
curl -L https://github.com/ucl98/config/raw/main/nvim/init.lua -o /root/.config/nvim/init.lua
# Tmux plugin manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Tmux configuration
git clone https://github.com/ucl98/config.git /tmp/config
cp -r /tmp/config/tmux /root/.config/tmux
rm -rf /tmp/config
# Add a note for shorcuts and reference the folder for nvim
# curl https://raw.githubusercontent.com/ucl98/config/refs/heads/main/notes/shorcuts.md > /workspace/notes/shortcuts.md
echo TERM=xterm-256color >> ~/.bashrc
# Install wezterm
# curl -fsSL https://apt.fury.io/wez/gpg.key | gpg --yes --dearmor -o /etc/apt/keyrings/wezterm-fury.gpg
# echo 'deb [signed-by=/etc/apt/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | tee /etc/apt/sources.list.d/wezterm.list
# apt update
# apt install -y wezterm
# Install lazygit
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": *"v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
mkdir -p ~/bin
mv lazygit ~/bin/
rm lazygit.tar.gz
echo 'export PATH=$PATH:~/bin' >> ~/.bashrc
STARTUP_SCRIPT="/root/.ipython/profile_default/startup/01-matplotlib-wezterm.py"
touch $STARTUP_SCRIPT
cat << EOF > "$STARTUP_SCRIPT"
import matplotlib
matplotlib.use('module://matplotlib-backend-wezterm')
import matplotlib.pyplot as plt
EOF
source ~/.bashrc