|
22 | 22 | echo "tmux already installed!"
|
23 | 23 | fi
|
24 | 24 |
|
| 25 | +# remove any old nvim config |
| 26 | +rm -rf ~/.config/nvim |
25 | 27 | # Clone Neovim configuration
|
26 | 28 | git clone --depth 1 https://github.com/daliendev/astro-nvim/ "$HOME/.config/nvim"
|
| 29 | +# Install necessary LSP and plugins |
| 30 | +nvim --headless '+Lazy! sync' +qall |
27 | 31 |
|
28 | 32 | # Auto start tmux on SSH or xtermjs
|
29 | 33 | cat >>"$HOME/.bashrc" <<'EOF'
|
30 | 34 | if test ! -v TMUX && (test -v SSH_CONNECTION || test "$PPID" == "$(pgrep -f '/ide/xterm/bin/node /ide/xterm/index.cjs' | head -n1)"); then
|
31 | 35 | if ! tmux has-session 2>/dev/null; then
|
32 | 36 | # Create a new detached tmux session named "gitpod"
|
33 | 37 | tmux new-session -d -s gitpod -n "editor"
|
34 |
| - # Send the Neovim command to the session, it will install necessary LSP and plugins |
35 |
| - tmux send-keys -t gitpod "nvim --headless '+Lazy! sync' +qall" C-m |
36 | 38 | fi
|
37 | 39 | exec tmux attach
|
38 | 40 | fi
|
39 | 41 | EOF
|
40 | 42 |
|
41 |
| -# Download Gitpod Tmux Configuration |
42 |
| -curl -L "https://raw.githubusercontent.com/axonasif/gitpod.tmux/main/gitpod.tmux" --output ~/gitpod.tmux |
43 |
| -chmod +x ~/gitpod.tmux |
44 |
| -! grep -q 'gitpod.tmux' ~/.tmux.conf 2>/dev/null && echo "run-shell -b 'exec ~/gitpod.tmux'" >>~/.tmux.conf |
45 |
| - |
46 | 43 | # Install Nerd Font (JetBrainsMono Nerd Font) only if not already installed
|
47 | 44 | if ! fc-list | grep -qi "JetBrains Mono"; then
|
48 | 45 | curl -L https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/JetBrainsMono.zip -o ~/JetBrainsMono.zip
|
|
52 | 49 |
|
53 | 50 | # Set Nerd Font in .tmux.conf
|
54 | 51 | ! grep -q 'Nerd Font' ~/.tmux.conf 2>/dev/null && echo "set-option -g default-terminal 'xterm-256color'" >>~/.tmux.conf
|
| 52 | + |
| 53 | +# Download Gitpod Tmux Configuration |
| 54 | +curl -L "https://raw.githubusercontent.com/axonasif/gitpod.tmux/main/gitpod.tmux" --output ~/gitpod.tmux |
| 55 | +chmod +x ~/gitpod.tmux |
| 56 | +! grep -q 'gitpod.tmux' ~/.tmux.conf 2>/dev/null && echo "run-shell -b 'exec ~/gitpod.tmux'" >>~/.tmux.conf |
0 commit comments