Neo Vim is a new generation VIM editor. It has beautiful UI.
Installation
- Download NeoVim:
1
wget https://github.com/neovim/neovim/releases/download/v0.10.0/nvim.appimage
- Install:
1
2
chmod +x nvim.appimage
mv nvim.appimage /usr/local/bin/nvim
Preset Configuration setup
- Download
dotfiles
from github and usestow
command to link config:
1
2
3
git clone git@github.com:mrasif/dotfiles.git
cd dotfiles
stow nvim -t $HOME
- Remove pre installed config:
1
2
rm -rf ~/.config/nvim
rm -rf ~/.local/share/nvim
- Install downloaded config:
1
mv nvim ~/.config/
- Verify new directory location should be
~/.config/nvim
whereinit.lua
should present. Here is referance tree-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$ tree ~/.config/nvim
nvim
├── init.lua
├── lazy-lock.json
└── lua
├── plugins
│ ├── alpha.lua
│ ├── catppuccin.lua
│ ├── completions.lua
│ ├── debugging.lua
│ ├── git-stuff.lua
│ ├── gitsigns.lua
│ ├── lsp-config.lua
│ ├── neo-tree.lua
│ ├── none-ls.lua
│ ├── nvim-tmux-navigation.lua
│ ├── oil.lua
│ ├── swagger-preview.lua
│ ├── telescope.lua
│ ├── treesitter.lua
│ └── vim-test.lua
├── plugins.lua
└── vim-options.lua
- Install
language server
1
2
3
4
5
wget https://github.com/LuaLS/lua-language-server/releases/download/3.9.1/lua-language-server-3.9.1-linux-x64.tar.gz
mkdir /opt/lua-language-server
mv mv lua-language-server-3.9.1-linux-x64.tar.gz /opt/lua-language-server/
cd /opt/lua-language-server
tar -zxvf lua-language-server-3.9.1-linux-x64.tar.gz
- Setup environment, add this line to your
.bashrc
/.zshrc
1
2
export PATH=$PATH:/opt/lua-language-server/bin
- Install
gopls
1
go install golang.org/x/tools/gopls@latest
- Open NVIM
1
nvim
- Add
.env.nvim
file to your project directory, which is environment variable files of your project, will be auto exported to your vim env. - Use nvim command
:Lazy
to open lazy dashboard. - Press
Shift + I
to install dependency. - Install
dlv
debugger for golang development.
1
go install github.com/go-delve/delve/cmd/dlv@latest
- Install
ripgrep
for Telescope live grep.
1
sudo apt-get install ripgrep
Shortcut
Find shortcut:
Space + Space
will open Old files finder.Ctrl + p
will open Find files finder.Space + fg
will open Live files finder.Ctrl + n
will open File Tree at LeftSpace + bf
will open floating buffered file tree.
Pane shortcut:
Ctrl + ww
will move focus to next pane.
Debugging shortcut:
gb
to add breakpoint.gf
to go next step.gr
to run debugger or continue.
coding shortcut:
Space + gd
to go to description.Space + gr
to go to reference.Shift + K
to view quick code doc.Space + gf
to format code.y
to copy selected text to clipboard.c
to cut selected text and copy to clipboard.p
to paste from clipboard.