-
Notifications
You must be signed in to change notification settings - Fork 0
/
nv_setup.sh
executable file
·66 lines (61 loc) · 2.12 KB
/
nv_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
#!/bin/bash
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage --appimage-extract
./squashfs-root/AppRun --version
sudo mv squashfs-root /
sudo ln -s /squashfs-root/AppRun /usr/bin/nvim
# Optional: exposing nvim globally.
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
#sudo update-alternatives --install $(which vim) vim $(which nvim) 10
#sudo update-alternatives --config vim
set -x
if [[ -d $HOME/.config/nvim/ ]]
then
echo "cont"
else
mkdir -p ~/.config/nvim
fi
if [[ -f $HOME/.config/nvim/init.vim ]]
then
cp init.vim $HOME/.config/nvim/
else
cat > $HOME/.config/nvim/init.vim <<EOL
set number
syntax on
set tabstop=4
set sw=4
filetype indent off
set nocindent
call plug#begin()
Plug 'https://github.com/preservim/nerdtree' " NerdTree
Plug 'https://github.com/tpope/vim-commentary' " For Commenting gcc & gc
Plug 'https://github.com/vim-airline/vim-airline' " Status bar
Plug 'https://github.com/rafi/awesome-vim-colorschemes' " Retro Scheme
Plug 'https://github.com/ryanoasis/vim-devicons' " Developer Icons
Plug 'https://github.com/tc50cal/vim-terminal' " Vim Terminal
Plug 'https://github.com/preservim/tagbar' " Tagbar for code navigation
Plug 'https://github.com/tpope/vim-fugitive'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
set encoding=UTF-8
call plug#end()
:colorscheme hybrid_material
nnoremap <C-f> :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-a><C-t> :NERDTreeToggle<CR>
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
EOL
fi
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
source ~/.bashrc
nvm install 20
# To understand coc.nvim https://github.com/neoclide/coc.nvim/wiki/Language-servers
# run the following from vim command prompt , escape then : to get the vim command prompt
# PlugInstall
# then restart vim again
#CocInstall coc-clangd
#CocCommand clangd.install