Home

Awesome

My Neovim Setup

My personal Neovim setup written in Lua.

<div align="center"> <img src="https://raw.githubusercontent.com/wuelnerdotexe/nvim/main/assets/screenshot_(default).png"> <small>Setup without <a href="https://github.com/wuelnerdotexe/nvim/blob/8c6872f430dd31e15f155afe4a812d840dfcd4cd/lua/wuelnerdotexe/plugin/init.lua#L19"><code>opt</code></a> plugins imported (default).</small> </div> <div align="center"> <img src="https://raw.githubusercontent.com/wuelnerdotexe/nvim/main/assets/screenshot_(enhanced).png"> <small>Setup with <a href="https://github.com/wuelnerdotexe/nvim/blob/8c6872f430dd31e15f155afe4a812d840dfcd4cd/lua/wuelnerdotexe/plugin/init.lua#L19"><code>opt</code></a> plugins imported (enhanced).</small> </div>

Table of Contents

Features

The main features and plugins provided by this setup are as follows:

Philosophy

My Neovim setup, unlike many others, has and follows a well-defined philosophy, governed by coherence and minimalism. You won't find any unnecessary plugins or redundant plugins here, and every little aspect is tweaked to keep everything consistent as a whole; for example, all the icons used are the standard ones and all floating windows have a rounded edge. As it should be...

DISCLAIMER: due to this you will see that I make many commits perfecting aspects that seem insignificant, I apologize for my sick perfectionism.

Requirements

Installation

First, if you have a previous Neovim config, make sure to make a backup before installing this setup in case something goes wrong in the process. This is done by backing up the ~/.config/nvim/ folder and its contents.

To install this configuration, you just need to clone this repository to the Neovim user config runtime directory for your operating system, which you can find here, or by running the :help config help command within Neovim. For a clean install, make sure you have all Neovim runtime folders ~/.local/share/nvim (Linux/MacOS) and $LOCALAPPDATA/nvim-data (Windows) clean.

For example, to install on Linux/MacOS:

git clone https://github.com/wuelnerdotexe/nvim ~/.config/nvim --depth 1

Keymaps

The keymaps created by this config are very well thought out to be intuitive, meaningful, and most of all, to stick to the essence of Vim without conflicting with it. Keymaps are normally assigned two letters, which signify an action, for example: d + p = diagnostic preview. Keep in mind that the functionality will always come first and then the action. This is the standard created and used by this configuration for unique consistency.

IMPORTANT: the \ (backslash) remains as the <leader> key, and the | (pipe) remains as the <localleader> key.

General

VI ModeKeymapDescription
Normal<leader> + f + tToggle the folders explorer
Normal<leader> + f + fFind files in the current directory
Normal<leader> + p + fFind the workspace projects
Normal<leader> + o + fFind recently opened files
Normal<leader> + m + fFind Vim files marks
Normal and visual<leader> + w + fFind word in the current directory
Normal and visual<leader> + w + rReplace word in the current directory
Normal and visual<leader> + s + rStructural search and replace in the current directory
Normal<leader> + g + tToggle the git explorer
Normal<leader> + g + fFind files from git status
Normal<leader> + b + fFind opened buffers
Normal<leader> + r + fFind resume
Normal<leader> + s + tToggle document symbols
Normal<leader> + t + oOpen the terminal in a new buffer

Explorer

VI ModeKeymapDescription
NormalDouble left mouse clickExpand/open or collapse node
NormalENTERExpand/open or collapse node
NormalCTRL + tOpen in a new tab
NormalCTRL + sOpen in a new split
NormalCTRL + vOpen to the side
NormalaAdd node
NormalrRename node
NormalmMove node
NormalcCopy node
NormaldDelete node
NormalyCopy node to clipboard
NormalxCut node to clipboard
NormalpPaste node from clipboard
Normal<localleader> + ptToggle preview
NormalqExit
Normal<F5>Refresh the explorer

Folders Explorer

VI ModeKeymapDescription
Normal>Enter directory
Normal<Leave directory
Normal/Fuzzy finder
NormalCTRL + fFilter nodes
Normal<Esc>Clear filter
Normal[ + gGo to previous git modified node
Normal] + gGo to next git modified node

Git Explorer

VI ModeKeymapDescription
Normalg + sGit stage file
Normalg + uGit unstage file
Normalg + rGit revert file
Normalg + AGit add all
Normalg + cGit commit

Windows

VI ModeKeymapDescription
Normal and visualCTRL + hMove to the left window
Normal and visualCTRL + jMove to the down window
Normal and visualCTRL + kMove to the up window
Normal and visualCTRL + lMove to the right window
Normal and visualAlt + hResize the window on the left
Normal and visualAlt + jResize the window on the down
Normal and visualAlt + kResize the window on the up
Normal and visualAlt + lResize the window on the right
Normal and visualCTRL + w + hSwap window to left
Normal and visualCTRL + w + jSwap window to down
Normal and visualCTRL + w + kSwap window to up
Normal and visualCTRL + w + lSwap window to right
Normal and visualCTRL + w + oClose all windows except the current one
Normal and visualCTRL + w + tOpen the current file in a new tab
Normal and visualCTRL + w + sSplit horizontally the current file
Normal and visualCTRL + w + vSplit vertically the current file

Buffers

VI ModeKeymapDescription
Normalg + BGo to previous buffer
InsertSHIFT + PAGE UPGo to previous buffer
Normalg + bGo to next buffer
InsertSHIFT + PAGE DOWNGo to next buffer
NormalSHIFT + HomeMove buffer left
NormalSHIFT + EndMove buffer right

Tabs

VI ModeKeymapDescription
Normalg + TGo to the previous tab
InsertCTRL + PAGE UPGo to the previous tab
Normalg + tGo to the next tab
InsertCTRL + PAGE DOWNGo to the next tab

Snippets

VI ModeKeymapDescription
InsertTABExpand snippet or jump to the next snippet node
Insert and selectSHIFT + TABJump to the previous snippet node
selectTABJump to the next snippet node

Selection

VI ModeKeymapDescription
NormalSpaceInit incremental selection
VisualSpaceIncrement the node selection
VisualCTRL + SpaceIncrement the scope selection
VisualBackspaceDecrement the node selection
Visual and operator pendinga + fSelect arround function
Visual and operator pendingi + fSelect inner function
Visual and operator pendinga + cSelect arround condition
Visual and operator pendingi + cSelect inner condition
Visual and operator pendinga + lSelect arround loop
Visual and operator pendingi + lSelect inner loop

Commenting

VI ModeKeymapDescription
Normalg + c + cComment the current line
Visual and operator pendingg + cComment current selection

Moving text

VI ModeKeymapDescription
Normal and visualAlt + LeftMove char left
Normal and visualAlt + DownMove line down
Normal and visualAlt + UpMove line up
Normal and visualAlt + RightMove char right

Git

VI ModeKeymapDescription
Normal<localleader> + g + dSplit git diffs
Normal<localleader> + d + tToggle show deleted lines
Normal[ + hGo to the previous hunk (can be repetable with , and ;)
Normal] + hGo to the next hunk (can be repetable with , and ;)
Normal<localleader> + h + pPreview the current hunk
Normal<localleader> + b + pPreview the current line blame
Normal and Visual<localleader> + h + sStage the current hunk
Normal<localleader> + h + rReset the current hunk

Language servers

VI ModeKeymapDescription
Normal<leader> + l + tToggle lines diagnostics
Normal<leader> + h + tToggle inlay hints
Normal<leader> + d + pPreview of the current diagnostic
Normal<leader> + d + lShow list of diagnostics
Normal[ + dGo to previous diagnostic (can be repetable with , and ;)
Normal] + dGo to next diagnostic (can be repetable with , and ;)
InsertCTRL + bScroll up in the documentation
InsertCTRL + fScroll down in the documentation
NormalKShow hover documentation
InsertCTRL + kShow signature help
Normal<localleader> + s + rRename the current symbol
Normal<localleader> + r + lShow list of references
Normalg + dGo to definition
Normalg + DPeek definition
Normalg + iGo to implementation
Normal<localleader> + c + aShow current code actions
Normal and Visual<localleader> + c + fFormat the code

Debugging

VI ModeKeymapDescription
Normal<F9>Toggle breakpoint on the current line
Normal<F5>Run and debug
NormalSHIFT + <F5>Terminate the current debugging session
NormalSHIFT + CTRL + <F5>Restart the current debugging session
Normal<F6>Debug pause
Normal<F10>Debug step over
Normal<F11>Debug step into
NormalCTRL + <F11>Debug step into targets
NormalSHIFT + <F11>Debug step out

NOTE: only custom keymaps unique to this configuration are documented here. There are many more keymaps available by default in each installed plugin, in addition to the hundreds that come with Vim by default.

Recommendations

Fonts

In order for the Enfocado's Human Writing feature work as it should, I recommend that you use either of these three beautiful fonts, which align with the "Mankind and Machine" concept.

Maintainer

Hi πŸ‘‹, I'm Wuelner, a software developer from Guatemala, passionate about creating minimalist solutions using solid fundamentals focused on "how things should be".

License

GPL-3.0 Β© Wuelner MartΓ­nez.

<p align="center">With πŸ’– from <strong>LATAM</strong> to the world!</p>