Personal Neovim setup based on LazyVim, managed with lazy.nvim. It extends the LazyVim starter with custom plugins, editor options, Telescope mappings, colorscheme persistence, and workflow commands for Ruby, SQL, JSON, and more.
For LazyVim’s built-in features and default keymaps, see the LazyVim documentation.
- Neovim ≥ 0.11.2 (LuaJIT build)
- Git ≥ 2.19.0
- A Nerd Font (icons in UI plugins)
- Optional CLI tools used by custom commands:
python3,sqlformat,underscore,ogg123(audio commands), etc.
Use install.sh — it checks dependencies, backs up any existing config, installs into ~/.config/nvim, syncs plugins, and opens Neovim.
There are three ways to install (the script picks the right one automatically):
| Situation | What ./install.sh does |
|---|---|
curl | bash |
clone — clones into ~/.config/nvim |
Clone into ~/.config/nvim, then ./install.sh |
ready — config is already in place; only syncs plugins (no backup, no symlink) |
Clone elsewhere (e.g. ~/Projects/nvim-config), then ./install.sh |
link — symlinks ~/.config/nvim → that folder |
curl -fsSL https://raw.githubusercontent.com/alexesba/nvim-config/master/install.sh | bashClones into ~/.config/nvim, syncs plugins, opens Neovim.
git clone https://github.com/alexesba/nvim-config.git ~/.config/nvim
cd ~/.config/nvim
./install.shThe repo is already where Neovim expects it. The script detects ready mode: it does not move or symlink your config, only runs plugin sync and opens Neovim.
git clone https://github.com/alexesba/nvim-config.git ~/Projects/nvim-config
cd ~/Projects/nvim-config
./install.shUses link mode: symlinks ~/.config/nvim → your clone. Good if you keep the repo under ~/Projects (or similar) and edit it there.
Rule of thumb: if you run ./install.sh from inside the repo, the script checks whether that folder is ~/.config/nvim (ready) or should be linked to it (link).
- Check for
gitand Neovim (install Neovim via Homebrew/apt/pacman/dnf if missing) - Back up existing
~/.config/nvimto~/.config/nvim.bak.<timestamp> - clone or link as above
- Ask for your
<leader>key when run interactively (default,; skipped ifleader.local.luaalready exists) - Run
nvim --headless "+Lazy! sync"to install plugins - Open Neovim
./install.sh --help # usage and environment variables| Variable | Default | Purpose |
|---|---|---|
INSTALL_DIR |
~/.config/nvim |
Neovim config path |
REPO_URL |
https://github.com/alexesba/nvim-config.git |
Clone URL (clone mode) |
REPO_BRANCH |
master |
Branch to clone |
INSTALL_MODE |
auto (ready / link / clone) |
Force clone or link |
MAPLEADER |
, |
Leader key when install is non-interactive (curl | bash) |
FORCE_LEADER |
— | Set to 1 to choose leader again during install |
After install: :Lazy, :Lazy sync, :LazyExtras.
- LazyVim — IDE-style defaults (LSP, formatting, linting, treesitter, which-key, etc.)
- lazy.nvim — plugin manager
- Leader key —
<leader>(default:,comma).install.shcan prompt for your choice and writeslua/config/leader.local.lua(gitignored). Change later by editing that file or copying fromlua/config/leader.local.lua.example
| Extra | Purpose |
|---|---|
ai.copilot |
GitHub Copilot integration |
ai.copilot-chat |
Copilot Chat |
coding.mini-surround |
Surround text with pairs (brackets, quotes, etc.) |
| Plugin | Role |
|---|---|
telescope.nvim |
Fuzzy finder (files, grep, buffers, colorschemes, keymaps) |
oil.nvim |
File explorer (default explorer; Neo-tree / mini.files disabled) |
luatab.nvim |
Tab line UI |
noice.nvim |
Rounded LSP hover/signature borders (cmdline/messages left to defaults) |
vim-dadbod + UI |
Database connections and SQL buffers |
tpope/vim-abolish, vim-bundler |
Ruby/refactor helpers |
markdown-preview.nvim |
Live Markdown preview in browser |
asyncrun.vim |
Run shell commands asynchronously |
sainnhe/sonokai |
Sonokai colorscheme (lazy-loaded) |
colorscheme-persist |
Remember last colorscheme across sessions |
bufferline.nvimneo-tree.nvimmini.files- Snacks file explorer (Oil is used instead)
- Line numbers + relative numbers, 81-column guide, rounded floating window borders
- Arrow keys disabled in Normal / Insert / Visual (use
hjkl) - Search centering (
n/Nwithzz), betterJjoin, undo breakpoints in Insert - Diagnostics — virtual text off; float opens on
CursorHold(seelua/plugins/lsp.lua,lua/config/autocmds.lua) - Colorschemes — default Tokyo Night (moon); last pick restored on startup (Telescope or
:colorscheme); fallback Tokyo Night if saved theme fails
Saved theme path: ~/.local/state/nvim/last-colorscheme
| Key | Action |
|---|---|
<leader>ff |
Find files (ignores node_modules, .git) |
<leader>fg |
Live grep |
<leader>fk |
Grep word under cursor |
<leader>fb |
Buffers |
<leader>fh |
Help tags |
<leader>fc |
Colorscheme picker (preview enabled; choice is persisted) |
<leader>fm |
Keymaps |
:ColorScheme also opens the colorscheme picker.
<leader>fcor:ColorScheme— pick a theme in Telescope.- Or
:colorscheme <name>(e.g.sonokai,tokyonight). - Restart Neovim — your last theme is restored automatically.
To reset persistence:
rm -f ~/.local/state/nvim/last-colorscheme| Key / command | Action |
|---|---|
- |
Open parent directory |
:Explorer, :Explore, :Exp |
Open Oil in current directory |
| Key | Action |
|---|---|
<leader>mp |
Toggle Markdown preview (markdown / md buffers) |
| Command | Action |
|---|---|
:DBUI |
Database UI |
:DBUIToggle |
Toggle UI |
:DBUIAddConnection |
Add connection |
:DBUIFindBuffer |
Find SQL buffer |
| Key | Action |
|---|---|
<leader>1 … <leader>9, <leader>0 |
Go to tab 1–9 / last tab |
| Key / command | Action |
|---|---|
:OpenConfig |
Edit $MYVIMRC |
:Reload |
Source config |
<leader>fef |
Format whole buffer (gg=G) |
<leader>cf |
Copy full file path to clipboard |
Formatting and cleanup: FormatJSON, FormatJSONV2, FormatCss, FormatSQL, FormatSQLV2, FormatXML, RemoveEmptyLines, RemoveExtraEmptyLines, CleanWhiteSpaces, ConvertTabToSpaces, AddLineNumbers, RemoveLineBreak
Quotes / Ruby: DoubleQuotes, SingleQuotes, DoubleQuotesC, SingleQuotesC, HashNewSyntax, HashOldSyntax, UpdateRubyHashesByLines, UnscapeDoubleQuotes
Paths: CopyFullPath, CopyRelativePath
Misc: ShowHiName (highlight group under cursor), Reprobado / Reprobada (audio; needs ogg123)
Use :command or Telescope <leader>fm to discover more.
| Key | Action |
|---|---|
<leader>no / <leader>na |
Play Reprobado / Reprobada sound |
<leader>rp |
Start substitute for word under cursor |
Y |
Yank to end of line |
Esc |
Clear search highlight |
LazyVim’s own maps (LSP, windows, etc.) still apply — press <leader> and wait for which-key, or check LazyVim keymaps.
├── install.sh # Automated install + plugin sync + launch nvim
├── init.lua # Entry: loads config.lazy
├── lazyvim.json # LazyVim extras and version metadata
├── lua/
│ ├── config/
│ │ ├── lazy.lua # lazy.nvim + LazyVim bootstrap
│ │ ├── options.lua # vim options, leader, UI prefs
│ │ ├── keymaps.lua # Custom keymaps
│ │ ├── autocmds.lua # Autocmds + user commands
│ │ └── colorscheme.lua # Persist/load theme helpers
│ ├── plugins/ # Plugin specs (one file per concern)
│ └── utils/ # Shared helpers (map, functions, etc.)
└── README.md
Add or override plugins by creating files under lua/plugins/; they are imported automatically from lua/config/lazy.lua.
- Change default colorscheme behavior —
lua/plugins/colorscheme-persist.lua,lua/config/colorscheme.lua - Add plugins — new
lua/plugins/<name>.luareturning a lazy spec table - Toggle LazyVim extras —
:LazyExtrasor editlazyvim.json - Disable a plugin —
enabled = falsein a spec, orlua/plugins/disabled.lua