Skip to content

Latest commit

 

History

History
421 lines (328 loc) · 21.3 KB

README.md

File metadata and controls

421 lines (328 loc) · 21.3 KB

Neovim Configuration

This is my neovim configuration based on lazyvim.org and lazy.vim.

Keymaps

Leader Key

Key Description
<leader> The leader key is a space:  
<localleader> The local leader key is a space:  

General

Key/Chord Description Modes
. Repeat last action n
h Move the cursor left n
j Move the cursor down n
k Move the cursor up n
l Move the cursor right n
<C-u> Move the cursor up a screen n
<C-d> Move the cursor down a screen n
<C-h> Move to the window to the left n, t
<C-j> Move to the window below n, t
<C-k> Move to the window above n, t
<C-l> Move to the window to the right n, t
<C-Up> Resize smaller by 2 lines n
<C-Down> Resize larger by 2 lines n
<C-Left> Resize narrower by 2 lines n
<C-Right> Resize wider by 2 lines n
<A-j> Move line down n, i, v
<A-k> Move line up n, i, v
< Decrease indent of selected line(s) v
> Increase indent of selected line(s) v
J Join lines and keep the cursor position n
<S-h>, [b Previous buffer n
<S-l>, ]b Next buffer n
<leader>bb, <leader>` Switch to other buffer n
<esc>, <C-c> Escape and clear search n, i
<leader>ur Update Render (Redraw / clear hlsearch/ diff update) n
gw, * Search word under cursor n, x
/ Start a new search n, x, o
n Next search result n, x, o
N Previous search result n, x, o
<C-s> Save file i, v, n, s
<leader>l Open Lazy Plugin Manager n
<leader>fn New File n
<leader>xl Location List n
<leader>xq Quickfix List n
<leader>uf Toggle format on Save n
<leader>us Toggle Spelling n
<leader>uw Toggle Word Wrap n
<leader>ul Toggle Line Numbers n
<leader>ud Toggle Diagnostics n
<leader>uc Toggle Conceal n
<leader>gg Lazygit (root dir) n
<leader>gG Lazygit (cwd) n
<leader>qq Quit all n
<leader>ui Inspect Pos n
<leader>ft Toggle Terminal n
<leader>ft, <C-/> Terminal (root dir) n
<leader>fT, Terminal (cwd) n
<C-_> which_key_ignore n, t
<esc><esc> Enter normal mode t
<C-/> Hide Terminal t
<leader>ww Other window n
<leader>wd Delete Window n
<leader>w-, <leader>- Split window below n
<leader>w| , <leader>| Split window right n
<leader><tab>l Last Tab n
<leader><tab>f First Tab n
<leader><tab><tab> New Tab n
<leader><tab>d Delete Tab n
<leader><tab>] Next Tab n
<leader><tab>[ Previous Tab n
<leader>p Preserve the yanked word in the register when pasted x
<leader>d Delete the void register n, v

Plugins

LSP

Language Server Protocol

Key/Chord Description Mode
<leader>cd Line Diagnostics n
<leader>cl Lsp Info n
gd Go to Definition n
gr Go to References n
gD Go to Declaration n
gI Go to Implementation n
gy Go to T[y]pe n
K Hover n
gK Signature Help n
<C-k> Signature Help i
]d Next Diagnostic n
[d Previous Diagnostic n
]e Next Error n
[e Previous Error n
]w Next Warning n
[w Previous Warning n
<leader>cf Format Document n
<leader>cf Format Range v
<leader>ca Code Action n, v
<leader>cA Source Action n
<leader>cr Rename

When the LSP server attaches:

Key/Chord Description Mode
<C-Space> Show hover actions n
<leader>a Show code actions group n

Adds a line of all the open buffers making it look almost like tabs.

Key/Chord Description Mode
<leader>bp Toggle Buffer Pin N
<leader>bP Delete unpinned buffers N
Key/Chord Description Mode
<leader>bd Delete Buffer n
<leader>bD Delete Buffer (Force) n

f/F/t/T on steroids, building on the Leap interface.

Usage

  • Type f enter the character to jump toward.
  • If multiple options are allowed, enter the label
Key/Chord Description Mode
f Find (inclusive) forward motion n
F Find (inclusive) backward motion n
t To (exclusive) forward motion n
T To (exclusive) backward motion n

Leap is a general-purpose motion plugin for Neovim.

Usage

  • Type sl
  • Enter the first character and second character for your search
  • If there are multiple options enter the additional label
Key/Chord Description Mode
<leader>sl Leap forward to n, x, o
<leader>sL Leap backward to n, x, o
gsl Leap from windows n, x, o

Surround text with other characters

Key/Chord Description Mode
ysa Add Surrounding {motion} n, v
ysd Delete Surrounding n
ysf Find right surrounding n
ysF Find left surrounding n
ysr Replace surrounding n
ysn Update MiniSurround.config.n_lines n

Tracks a branching tree of changes that can be navigated

Key/Chord Description Mode
<leader>u Show the undotree panel n

A folder explorer

Key/Chord Description Mode
<leader>fe, <leader>e Open in the root directory n
<leader>fE, <leader>E Open in the CWD n

A UI that replaces messages, cmdline, and the popupmenu.

Key/Chord Description Mode
<S-Enter> Redirect Cmdline c
<leader>snl Noice Last Message n
<leader>snh Noice History n
<leader>sna Noice All n
<leader>snd Dismiss all n
<C-f> Scroll Forward i, n, s
<C-b> Scroll Backward i, n, s

A fancy, configurable, notification manager for Neovim

Key/Chord Description Mode
<leader>un Dismiss all Notifications n

A search and replace panel for Neovim

Key/Chord Description Mode
<leader>sr Replace in Files n

A integration for tree-sitter for Neovim

Key/Chord Description Mode
<C-Space> Increment selection n
<BS> Decrement selection n

Automated session management

Key Description Mode
<leader>qs Restore Session n
<leader>ql Restore Last Session n
<leader>qd Don't Save Current Session n
Key/Chord Description Mode
<leader>,, <leader>fb Search Buffers n
<leader>: Command History n
<leader><space>, <leader>ff Find Files (root dir) n
<leader>fF Find Files (cwd) n
<leader>fr Recent (root dir) n
<leader>fR Recent (cwd) n
<leader>gc git commits n
<leader>gs git status and file diff n
<leader>sa Auto Commands n
<leader>sb Fuzzy Search Current Buffer n
<leader>sc Command History n
<leader>sC Commands n
<leader>sd Document diagnostics n
<leader>sD Workspace diagnostics n
<leader>sg, <leader>/ Live Grep (root dir) n
<leader>sG Grep (cwd) n
<leader>sh Help Pages n
<leader>sH Search Highlight Groups n
<leader>sk Key Maps n
<leader>sM Man Pages n
<leader>sm Jump to Mark n
<leader>so Options n
<leader>sR Resume n
<leader>sw Word (root dir) n
<leader>sW Word (cwd) n
<leader>uC Colorscheme with preview n
<leader>ss Goto Symbol n
<leader>sS Goto Symbol (Workspace) n

Use to highlight and search for todo comments like TODO, HACK, BUG

Key/Chord Description Mode
]t Next todo comment n
[t Previous todo comment n
<leader>xt Todo (Trouble) n
<leader>xT Todo/Fix/Fixme (Trouble) n
<leader>st Todo n
<leader>sT Todo/Fix/Fixme n

A pretty list for showing diagnostics, references, telescope results, quickfix and location lists to help you solve all the trouble your code is causing.

Key/Chord Description Mode
<leader>xx Document Diagnostics (Trouble) n
<leader>xX Workspace Diagnostics (Trouble) n
<leader>xL Location List (Trouble) n
<leader>xQ Quickfix List (Trouble) n
[q Previous trouble/quickfix item n
]q Next trouble/quickfix item n

Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.

Key/Chord Description Mode
]] Next Reference n
[[ Prev Reference n

Is a Debug Adapter Protocol client implementation for Neovim

Key/Chord Description Mode
<leader>dB Breakpoint Condition n
<leader>db Toggle Breakpoint n
<leader>dc Continue n
<leader>dC Run to Cursor n
<leader>dg Go to line (no execute) n
<leader>di Step Into n
<leader>dj Down n
<leader>dk Up n
<leader>dl Run Last n
<leader>do Step Out n
<leader>dO Step Over n
<leader>dp Pause n
<leader>dr Toggle REPL n
<leader>ds Session n
<leader>dt Terminate n
<leader>dw Widgets n
Key/Chord Description Mode
<leader>td Debug Nearest n

A UI for nvim-dap

Key/Chord Description Mode
<leader>du Dap UI n
<leader>de Eval nv

Is an DAP adapter for the Neovim lua language

Not installed

Key/Chord Description Mode
<leader>daL Adapter Lua Server n
<leader>dal Adapter Lua n

A framework for interacting with tests within NeoVim.

Key/Chord Description Mode
<leader>tt Run File n
<leader>tT Run All Test Files n
<leader>tr Run Nearest n
<leader>ts Toggle Summary n
<leader>to Show Output n
<leader>tO Toggle Output Panel n
<leader>tS Stop n

A Neovim plugin to easily create and manage predefined window layouts, bringing a new edge to your workflow.

Key/Chord Description Mode
<leader>ue Edgy Toggle n
<leader>uE Edgy Select Window n

project.nvim is an all in one neovim plugin written in lua that provides superior project management.

Not installed

Key/Chord Description Mode
<leader>fp Projects n

Snippets

Key/Chord Description Mode
<tab> Next Snippet i, s
<S-tab> Previous Snippet i, s

Intellisense/Autocomplete

Key/Chord Description Mode
<C-n> Next Item i
<C-p> Previous Item i
<C-b> Scroll Docs back i
<C-f> Scroll Docs forward i
<C-space> Select the item i
<C-e> Abort the autocomplete i
<CR> Selects the current item i
<S-CR> Selects and replaces the current item i