-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.bash
82 lines (67 loc) · 1.9 KB
/
install.bash
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
#!/bin/bash
#####################################################
# Install developer tools inside the docker container
#####################################################
if [ ! -d nvim ]; then
echo "install.bash must be run in the directory where it was unpacked"
exit
fi
# Install neovim dependencies
sudo apt-get --yes install libtool-bin gettext
# Build and install neovim with default settings
pushd . > /dev/null
git clone http://github.com/neovim/neovim.git
cd neovim
make -j8
sudo make install
popd > /dev/null
# Update bash aliases to use neovim
cat >> ~/.bash_aliases << EOF
alias vi=nvim
alias vim=nvim
alias vimdif="nvim -d"
EOF
# Install nvim-lsp clangd helper dependencies
sudo apt-get --yes install luarocks libxml2-dev
sudo luarocks install lua-xmlreader
# Update vim configuration
mkdir -p ~/.config/nvim
cp -R nvim/. ~/.config/nvim/.
# Add ftplugin to enable intellisense
pushd . > /dev/null
mkdir -p ~/.vim/after/ftplugin
cd ~/.vim/after/ftplugin
cat > c.vim << EOF
set omnifunc=v:lua.vim.lsp.omnifunc
EOF
popd > /dev/null
# Update TERM for colors
cat >> ~/.bashrc << EOF
export TERM=screen-256color
EOF
# Install tmux
sudo apt-get --yes install tmux
# Update TERM colors for tmux
mkdir -p terminfo
pushd . > /dev/null
curl -LO http://invisible-island.net/datafiles/current/terminfo.src.gz
gunzip terminfo.src.gz
tic -x terminfo.src
popd > /dev/null
# Update tmux.conf to support colors correctly
cat >> ~/.tmux.conf << EOF
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -g default-command bash
set -sg escape-time 20
EOF
# Install valgrind and valgrind viewer
sudo apt-get --yes install valgrind kcachegrind
# Install fish
sudo apt-get --yes install fish
# Install zoxide
curl -sS https://webinstall.dev/zoxide | bash
eval "$(zoxide init bash)"
# Install fzf for zoxide
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all