π₯ Article about my experience configuring NeoVim (RU): https://habr.com/ru/articles/932812/
- It's primarily set up to work with Go projects.
- Itβs also set up to work with Lua projects, as I developed this configuration in Neovim :)
- It includes the best Git integration, thanks to a variety of mappings and plugins.
- It includes NvChad modules and some features and principles from AstroNvim.
- The tool should simplify and speed up my work. This configuration is designed to make editing text and source code more convenient and efficient. If some solution looks strange but it's convenient for me, I'll use it.
- Minimalism. If I don't use the plugin, I delete it. If I don't use mapping, I delete it. The configuration includes only the features I need.
- Integrity. I have configured the plugins so that they look like a single unit. I try to use the same UI/UX principles everywhere.
- Minimum UI - maximum UX. I minimize the information displayed on the screen, but leave plenty of options in the keyboard shortcuts.
- Building from scratch. I've disabled all the preset options so that they don't interfere with me setting my own color scheme.
- Minimizing color noise. I really like the principles of the Alabaster theme from @Tonsky. This theme is too minimalistic and unusual for me, but these principles allowed me to take a different look at the logic of building a color theme. I use colors to highlight what is really important to me.
- Using color to add extra meaning. I use different colors rather than additional symbols to convey meaning.
- Do not use italics.
<leader>is a space.- Convenience and speed are more important than mnemonic rules. In many builds such as NvChad or AstroNvim most of the mapping is based on mnemonic rules:
<leader>ff- Find File,<leader>Ss- Save Session, etc. Such mappings are easy to remember, but they're not always optimal in terms of convenience and speed of use. I don't completely abandon mnemonic rules, but I prioritize convenience over them. Because of this, not all of my mappings may be intuitive to you. - The more frequently a mapping is used, the shorter it should be. Any mapping should be no longer than 4 keystrokes.
- Mappings should be easy and quick to type. I noticed that I type mapping most quickly if I press adjacent characters with different hands. The second fastest are mappings, where adjacent characters are pressed with different fingers of the same hand. And the last ones are when adjacent characters are pressed with one finger.
- Uniformity. For similar actions in different plugins, I use the same or similar mappings. For example,
<leader>e- for toggle NvimTree and toggle file explorer in diffview.
Just clone this repository and run neovim:
git clone https://github.com/Yu-Leo/nvim ~/.config/nvim && nvimAll plugins and extensions will be installed and configured automatically.
- Neovim >= 0.11.0
- a patched font for the icons, or change them to simple ASCII characters
- ripgrep
- git
# Remove config
rm -rf ~/.config/nvim
# Remove state
rm -rf ~/.local/state/nvim
rm -rf ~/.local/share/nvim.
βββ init.lua
βββ lua
β βββ autocmds.lua # File with neovim autocmds
β βββ configs # Directory with plugin configurations. Imported in the `plugins/init.lua`
β βββ lsp # Native Neovim LSP settings
β βββ mappings.lua
β βββ nvconfig.lua # Config for NvChad/base46
β βββ options.lua # File with neovim options
β βββ plugins/init.lua # File with a list of plugins
β βββ private # Private part of the config (in .gitignore)
β βββ themes/savannah.lua # My color theme
β βββ usercmds.lua # File with my custom commands
β βββ Yu-Leo # My utilities
βββ queries
βββ spell- It's still a Work In Progress and is unlikely to ever be fully stable. I change and improve this configuration almost every day.
- There are no guarantees of backward compatibility.
- The
developbranch contains the most up-to-date, but less stable version. Periodically, I squash commits in it and merge them intomain - Check out my neovim plugins:
Yu-Leo/blame-column.nvim- displaying git blame informationYu-Leo/gosigns.nvim- visualizing some Go hintsYu-Leo/cmp-go-pkgs- nvim-cmp source providing the names of Go packages to import
- Check out my other dotfiles:
Yu-Leo/dotfiles - Iβve spent over 230 hours learning and practicing in Vim, creating this configuration and my own plugins. I will be glad if you find something useful in them for yourself.
- License: MIT. Author: @Yu-Leo