My neovim configurations
The following packages need to be installed
- Clone the repository.
mkdir -p ~/.config/
## Clone the repository to ~/.config/nvim
git clone --depth 1 https://github.com/aswinkarthik93/neovim-dotfiles.git ~/.config/nvim
## Open nvim
nvim
- Nvim will automatically install Plugins. It will take some time to finish.
- For Installing new plugins, run
:PlugInstall
within the editor. - For Updating the plugins, run
:PlugUpdate
within the editor. - The default theme is
NeoSolarized
which is a Solarized dark theme and will work post plugin installation.
- Post installation if there are issues, use
:CheckHealth
. Neovim will do a health check and report on what is missing and how to fix it.
Neovim
Vimr
The above Vimr
is customized. It has,
- Hybrid colorscheme
- Fira code font with Font ligatures enabled
Frequently used keymaps,
Name | Value |
---|---|
<leader> | , |
, + e | Files fuzzy finder |
, + b | Buffer fuzzy finder |
<ctrl> + / | Opens NERDTree |
vv | Split Window vertically |
ss | Split Window horizontally |
<ctrl> + j,k,h,l | Navigation across split panels |
, + z | Move to Previous buffer |
, + x | Move to Next buffer |
<ctrl> + 6 | Toggle between buffers |
Golang specific Keymaps
Name | Value |
---|---|
, + r | Run all tests |
, + <shift> + r | Run specific test |
<ctrl> + a | Switch between test and source code |
<ctrl> + ] | Goto definition |
<ctrl> + t | Pop stack when going to definition |
Frequently used features,
- Uses
fzf
for fuzzy-finding. - Search with Ripgrep using
:Rgrep
- Use only
j
,k
,l
, andh
for navigation. Navigation keys will not work. (Apologies for this) - Use
:BufOnly
to delete all buffers except the active one. - Distraction free mode using
:Goyo
For custom configurations like changing theme locally or new keymaps, use ~/.config/nvim/custom.vim
. If you feel it is worth merging with this repository, pull requests are welcome too.
neovim is configured with neoformat plugin, to enable formatting for javascript:
npm install -g prettier
For autocompletion deoplete asynchronous completion framework and deoplete-go backed by gocode is used.
To install gocode, execute
go get -u github.com/mdempsky/gocod
For autocompletion racer is used, to correctly configure it follow the instruction on how to install racer from here
Configure your bash/zsh profile with export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
- To enable flow run:
npm install -g flow-bin
To support format shell script
brew install shfmt
To lint yaml files, install
brew install yamllint
For more info on yaml liniting visit here
- Install
jq
to use:SortJson
(sorts all keys of a JSON file).
In case on opening neovim/vimr it shows error that python3 is unavailable.
- Check if python3 is installed if not brew/pip install it.
a. In case of brew link error :
sudo mkdir usr/local/Frameworks sudo chown $(whoami):admin /usr/local/Frameworks brew install python3 pip3 install --upgrade neovim
Pull the latest changes from git and then reopen neovim/vimr and run :PlugUpdate
We have a Docker image which you use to try out this neovim config without affecting your existing setup.
docker run --rm -it aswinkarthik93/neovim-dotfiles bash
nvim