Personal neovim configuration, written in Lua with a focus on front-end development.
Uses lazy.nvim plugin manager and Everforest color scheme.
- neovim (version 0.8 or higher)
- ripgrep (for Telescope live grep)
- node (version 16 or higher)
- Nerd Fonts
- lazygit
- prettier (optional, for automatic code formatting)
- Clone repo
- Symlink configuration -
ln -s ~/repo/path ~/.config/nvim
- Open neovim to install all plugins, then restart
keys | mapping |
---|---|
<leader>qq | Quit |
<leader>ca | Show LSP code actions |
<leader>ch | Show LSP symbol signature |
[d | Move to previous diagnostic |
]d | Move to next diagnostic |
<leader>hl | Toggle search highlight |
<leader>a | Select all text in current buffer |
<leader>ws | Toggle show whitespace characters |
<leader>tk | Change vertical split to horizontal |
<leader>th | Change horizontal split to vertical |
File finder, previewer, and picker.
keys | mapping |
---|---|
<C-t> | Go to file in a new tab |
<leader>ff | File finder |
<leader>fg | Live grep |
<leader>fu | Open buffer browser |
File browser extension for Telescope.
keys | mapping |
---|---|
<leader>fb | Open file browser |
<C-h> | Toggle hidden files/folders |
Recent file browser extension for Telescope.
keys | mapping |
---|---|
<leader>fr | Open recent files browser |
File explorer tree.
keys | mapping |
---|---|
<C-n> | Toggle file explorer |
<leader>n | Focus file explorer |
<leader>nc | Collapse tree recursively |
<leader>nr | Refresh tree |
Tree-like symbol view.
See default keymaps
keys | mapping |
---|---|
<leader>so | Toggle symbol outline pane |
Delete buffers without messing up window layouts.
keys | mapping |
---|---|
<leader>q | Delete buffer without closing window |
Session management.
keys | mapping |
---|---|
<leader>qs | Restore session for current directory |
<leader>ql | Restore last session |
A pretty list for showing diagnostics, references, telescope results, quickfix and location lists.
keys | mapping |
---|---|
<leader>xx | TroubleToggle |
<leader>xw | TroubleToggle Workspace Diagnostics |
<leader>xd | TroubleToggle Document Diagnostics |
<leader>xl | TroubleToggle Location List |
<leader>xq | TroubleToggle Quick Fix |
gR | LSP References |
gY | LSP Type Definitions |
gD | LSP Definitions |
Easily comment and un-comment code.
keys | mapping |
---|---|
gcc | Comment out a line |
gc{motion} | Comment target of a motion |
Change, add, and remove surrounding characters.
keys | mapping |
---|---|
S | In visual mode - wrap selected text |
cs{existing character}{new character} | Replace surrounding characters |
ds{existing character} | Remove surrounding characters |
ysiw{surrounding character} | Surround current text with characters |
Examples:
cs"'
would replace double quotes with single quotesds"
would remove double quotes around a stringysiw]
would surround current text with square brackets- Use
]
for no space, and[
to enter space inside the brackets around text
- Use
S
in visual mode –S<p class="important">
would wrap selected line with a<p>
tag that includes a class
Inline git blame message.
keys | mapping |
---|---|
<leader>gb | Toggle git blame |
LazyGit integration for neovim.
keys | mapping |
---|---|
Lg | Open LazyGit |
Git status symbols in the sign column.
keys | mapping |
---|---|
[c | Previous hunk |
]c | Next hunk |
<leader>hp | Preview hunk |
<leader>hs | Stage hunk |
<leader>hu | Undo hunk |
Undo visualizer.
keys | mapping |
---|---|
<leader>h | Toggle undotree |
Dim inactive portions of code.
keys | mapping |
---|---|
<leader>t | Toggle Twilight |
- Further configuration of ufo code folding
- Remove folding indicators in sign column (make match repo screenshot)
- Fix diagnostics symbols in the sign column
- Right now it's showing 'W' or 'E' instead of icon
- Figure out why custom code snippets aren't working
- Would like to create a custom command/plugin (not sure which), where I could select a word, then run a command that would insert a console.log() statement on the next line with that value being logged out