Skip to content

Yu-Leo/nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦁 My Neovim configuration

πŸ”₯ Article about my experience configuring NeoVim (RU): https://habr.com/ru/articles/932812/

✨ Features

  • 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.

πŸ–οΈ Principles

🎲 General

  • 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.

🎨 Color theme

  • 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.

β˜„οΈ Mappings

  • <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.

πŸ“¦ Installation

Just clone this repository and run neovim:

git clone https://github.com/Yu-Leo/nvim ~/.config/nvim && nvim

All plugins and extensions will be installed and configured automatically.

⚑️ Requirements

  • Neovim >= 0.11.0
  • a patched font for the icons, or change them to simple ASCII characters
  • ripgrep
  • git

πŸ—‘οΈ Uninstallation (Linux / MacOS)

# Remove config
rm -rf ~/.config/nvim

# Remove state
rm -rf ~/.local/state/nvim
rm -rf ~/.local/share/nvim

βš™οΈ Structure

.
β”œβ”€β”€ 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

πŸš€ Development

  • 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 develop branch contains the most up-to-date, but less stable version. Periodically, I squash commits in it and merge them into main
  • Check out my neovim plugins:
  • 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

About

My Neovim configuration

Topics

Resources

License

Stars

Watchers

Forks