adalessa / wuelner-nvim

My personal Neovim setup written in Lua.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My Neovim Setup

My personal Neovim setup written in Lua.

Powered by Enfocado.

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

Post installation

After installing this setup, you will need to install packer.nvim, the package manager for this setup, from your terminal.

For example, to install on Linux/MacOS:

git clone --depth 1 https://github.com/wbthomason/packer.nvim\
 ~/.local/share/nvim/site/pack/packer/start/packer.nvim

Next, you need to install the Neovim plugins with the following instruction:

nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'

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 global <leader> leadermap.

General

VI Mode Keymap Description
Normal <leader> + f + t Toggle the folders explorer
Normal <leader> + f + f Find files in the current directory
Normal <leader> + p + f Find the workspace projects
Normal <leader> + o + f Find recently opened files
Normal <leader> + m + f Find Vim files marks
Normal <leader> + w + f Find words in the current directory
Normal <leader> + s + t Toggle document symbols
Normal <leader> + t + o Open the terminal in a new buffer
Normal <leader> + t + t Toggle bottom terminal

Folders explorer

VI Mode Keymap Description
Normal > Enter directory
Normal < Leave directory
Normal h Collapse node
Normal l Expand node
Normal o Expand/Collapse or open node
Normal Double left mouse click Expand/Collapse or open node
Normal ENTER Expand or open node
Normal BACKSPACE Collapse node
Normal CTRL + t Open in a new tab
Normal CTRL + s Open in a new split
Normal CTRL + v Open to the side
Normal n New path
Normal n + f New file
Normal n + d New directory
Normal m Move node
Normal c Copy node
Normal d Delete node
Normal q Exit
Normal <F5> Refresh the folders explorer

Windows

VI Mode Keymap Description
Normal CTRL + h Move to the left window
Normal CTRL + j Move to the down window
Normal CTRL + k Move to the up window
Normal CTRL + l Move to the right window
Normal Alt + h Resize the window on the left
Normal Alt + j Resize the window on the down
Normal Alt + k Resize the window on the up
Normal Alt + l Resize the window on the right
Normal CTRL + w + m Toggle maximizer window
Normal CTRL + w + o Close all windows except the current one
Normal CTRL + w + t Open the current file in a new tab
Normal CTRL + w + s Split horizontally the current file
Normal CTRL + w + v Split vertically the current file

Buffers

VI Mode Keymap Description
Normal g + B Go to previous buffer
Insert SHIFT + PAGE UP Go to previous buffer
Normal g + b Go to next buffer
Insert SHIFT + PAGE DOWN Go to next buffer
Normal SHIFT + Home Move buffer left
Normal SHIFT + End Move buffer right
Normal 1 + b Close all buffers except the current one

Tabs

VI Mode Keymap Description
Normal g + T Go to the previous tab
Insert CTRL + PAGE UP Go to the previous tab
Normal g + t Go to the next tab
Insert CTRL + PAGE DOWN Go to the next tab
Normal 1 + t Close all tabs except the current one

Autocomplete

VI Mode Keymap Description
Insert CTRL + p Turn on autocomplete and select the previous item
Insert CTRL + n Turn on autocomplete and select the next item
Insert SHIFT + TAB Turn on autocomplete only after a word and select the previous item
Insert TAB Turn on autocomplete only after a word and select the next item
Insert CTRL + b Scroll up in the item documentation
Insert CTRL + f Scroll down in the item documentation
Insert CTRL + e Abort the autocomplete menu

Commenting

VI Mode Keymap Description
Normal g + c+ c Comment the current line
Visual g + c Comment current selection

Moving Text

VI Mode Keymap Description
Normal Alt + Left Move char left
Normal Alt + Down Move line down
Normal Alt + Up Move line up
Normal Alt + Right Move char right

Git Signs

VI Mode Keymap Description
Normal <leader> + g + d Split git diffs
Normal <leader> + d + t Toggle show deleted lines
Normal <leader> + b + t Toggle the current line blame
Normal [ + h Go to the previous hunk
Normal ] + h Go to the next hunk
Normal <leader> + h + p Preview the current hunk
Normal <leader> + b + p Preview the current line blame
Normal and Visual <leader> + h + s Stage the current hunk
Normal and Visual <leader> + h + r Reset the current hunk

Diagnostics

VI Mode Keymap Description
Normal <leader> + l + t Toggle lines diagnostics
Normal <leader> + d + p Preview of the current diagnostic
Normal <leader> + d + l Show list of diagnostics
Normal [ + d Go to previous diagnostic
Normal ] + d Go to next diagnostic
Normal K Show hover documentation
Insert CTRL + k Show signature help
Normal <leader> + s + r Rename the current symbol
Normal <leader> + r + l Show list of references
Normal g + d Go to definition
Normal g + i Go to implementation
Normal <leader> + c + a Show current code actions

Debugging

VI Mode Keymap Description
Normal <F9> Toggle breakpoint on the current line
Normal <F5> Run and debug
Normal SHIFT + <F5> Terminate the current debugging session
Normal SHIFT + CTRL + <F5> Restart the current debugging session
Normal <F6> Debug pause
Normal <F10> Debug step over
Normal <F11> Debug step into
Normal CTRL + <F11> Debug step into targets
Normal SHIFT + <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.

Docker

If you would like to test my configuration without overriting yours or simply run neovim with my configuration in a container now is possible. You must have docker installed, and your user should be able to run docker without sudo command (withou this you may need to run your the following commands as sudo) Run the command make build this will prepare everything for you, the first time you run this may take some moment to download the necessary files from there you can just execute the file wnvim this will mount the current directory and since it runs in a container will not have access to other folders. Even changes done in the config directory in your machine will not affect the content of the container given that the containers during the build process created a copy of the configuration. If you would like to continue using neovim in this way you can run make install which will create a symlink to your ~/.local/bin directory which is expected to be part of your PATH if is not you should add it in your .bashrc, .profile, or .zshrc depending on your configuration The way the container is run the contents of the folders ~/.config/nvim and ~/.local/share/nvim are persisted in volumes of docker, running the build again will clean these.

Once you are in the editor from the container you need to run the first time :PackerSync which will download all the plugins, Note some errors are expected will be clear in the future but does not prevent the execution of neovim and my configuration.

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.

With πŸ’– from LATAM to the world!

About

My personal Neovim setup written in Lua.

License:GNU General Public License v3.0


Languages

Language:Lua 97.4%Language:Makefile 0.9%Language:Dockerfile 0.9%Language:Shell 0.8%