This is a NeoVim configuration written in Lua. It has a fair amount of comments to help personalize and adapt it. It includes various common useful plugins including TreeSitter, LSPZero, and Telescope.
It uses the Shinjuku color scheme and includes various useful key mappings.
Clone this repo into the nvim config location:
# on Linux and Mac
git clone https://github.com/samir-roy/init.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim# on Windows
git clone https://github.com/samir-roy/init.nvim.git %userprofile%\AppData\Local\nvim\When you first open Neovim, Lazy.nvim plugin manager will automatically install, followed by all the configured plugins.
Alternatively, you can run:
nvim --headless "+Lazy! sync" +qaThe leader key is <space> since the space bar is easy to reach.
<C-p>- picker (files in git repository)<leader>p- picker (files in git repository)<leader>x- xplorer (toggle file explorer using nvim-tree)<leader>t- tabs (list of open buffers)
<leader>fc- close current buffer<leader>l- jump to last accessed buffer<leader>1-9- jump to nth buffer<leader>[- previous buffer<leader>]- next buffer
<leader>b- jump to line start (same as $)<leader>e- jump to line end (same as ^)<leader>m- jump to matching bracket (same as %)<leader>j/k- page down/up (centered)[[and]]- jump to prev/next in jump list]cand[c- jump to prev/next hunk (git change)
jj- easier escape out of insert mode<C-h>- cursor movement left<C-j>- cursor movement down<C-k>- cursor movement up<C-l>- cursor movement right
?- clear search highlighting<leader>n- search for current word while keeping cursor in place<leader>r- search and replace current word<leader>u- show / hide undo tree<leader>w- save all buffers (same as :wa)<leader>W- save current buffer (same as :w)
L- easily move selected lines downH- easily move selected lines up
<leader>P- paste without replacing clipboard<leader>y- yank to system clipboard<leader>Y- yank to system clipboard (line)<leader>/- comment / uncomment current line or selection
<leader>i- info (show hover info)<leader>a- actions (list available code actions)<leader>g- go to definition (same as gd)<leader>d- diagnostics (open float)<leader>.- format file using lsp
<leader>fp- find files in project folder<leader>fw- find word under the cursor<leader>ff- find in files using grep<leader>fk- kontinue find (reopen results)<leader>fd- files having diagnostics<leader>fr- recently opened files
<leader>ss- search and replace<leader>S- search and replace in split screen<leader>sw- search for word under the cursor<leader>sw(visual) - search for text in selection
