๐Ÿงญ Eugene Neovim Config

April 28, 2026 ยท View on GitHub

Stargazers Issues License

๐Ÿ‡จ๐Ÿ‡ณ Chinese documentation: README_CN.md

A personal Neovim configuration built around lazy.nvim, modern LSP APIs, Telescope, blink.cmp, Catppuccin, and a focused editing workflow.

๐Ÿ“ธ Screenshot

โœจ Features

  • Modular lazy.nvim plugin specs
  • Telescope-first search workflow
  • LSP, completion, formatting, and linting out of the box
  • Git workflow with Gitsigns and Diffview
  • Floating terminal and optional Lazygit integration
  • Session restore, folding, snippets, and dashboard support

๐Ÿงฐ Requirements

  • Neovim 0.12 or newer
  • git
  • ripgrep for Telescope search and TODO search
  • make and a C compiler for telescope-fzf-native.nvim
  • Node.js and npm for some Mason tools
  • Python 3 for Python tooling
  • Optional: lazygit for <leader>gg

๐Ÿš€ Installation

Back up your existing Neovim config first:

mv ~/.config/nvim ~/.config/nvim.bak

Clone this repository:

git clone https://github.com/command-z-z/EugeneVim.git ~/.config/nvim

Start Neovim and let lazy.nvim install the plugins:

nvim

Then open Mason and install missing tools if needed:

:Mason

๐Ÿ—‚๏ธ Structure

init.lua
lua/
  options.lua
  mappings.lua
  plugins/
    init.lua
    ui.lua
    editor.lua
    search.lua
    lsp.lua
    git.lua
snippets/

lua/plugins/init.lua bootstraps lazy.nvim and imports plugin groups. Each plugin group owns its lazy-loading rules, options, and keymaps.

๐Ÿ”Œ Plugin Stack

  • UI: Catppuccin, lualine, bufferline, dashboard-nvim, noice.nvim, indent-blankline, which-key
  • Search: Telescope, telescope-fzf-native, telescope-file-browser, todo-comments
  • Editing: nvim-treesitter, nvim-ufo, nvim-autopairs, flash.nvim, persistence.nvim
  • Completion: blink.cmp, friendly-snippets, local snippets
  • LSP and tools: nvim-lspconfig, Mason, mason-lspconfig, mason-tool-installer, conform.nvim, nvim-lint, Trouble
  • Git and terminal: gitsigns.nvim, diffview.nvim, toggleterm.nvim

๐Ÿง  Language Support

Configured LSP servers:

  • Python: pyright
  • Lua: lua_ls
  • C/C++: clangd
  • Rust: rust_analyzer
  • Go: gopls

Configured formatters and linters:

  • Lua: stylua
  • Python: ruff
  • C/C++: clang-format
  • Shell: shfmt
  • Markdown: markdownlint

Mason installs the configured tools on startup when possible.

โŒจ๏ธ Keymaps

Leader is <Space>.

๐Ÿ’พ Files And Config

KeyAction
<C-s>Save file
<leader>eeEdit Neovim config
QQuit current window

๐ŸชŸ Windows

KeyAction
<leader>wsSplit window horizontally
<leader>wvSplit window vertically
<leader>whMove to left window
<leader>wjMove to lower window
<leader>wkMove to upper window
<leader>wlMove to right window
<M-left>Decrease window width
<M-right>Increase window width
<M-up>Increase window height
<M-down>Decrease window height

๐Ÿ“š Buffers

KeyAction
<Tab>Next buffer
<S-Tab>Previous buffer
<leader>bbFind buffers with Telescope
<leader>bdDelete buffer
<leader>1 to <leader>9Jump to buffer number
KeyAction
<leader>ffFind files
<leader>fgLive grep
<leader>fhFind help tags
<leader>foFind old files
<leader>fbFile browser
<leader>fBFile browser from current buffer directory
<leader>fFFind files from current buffer directory
<leader>fGLive grep from current buffer directory
<leader>ftFind TODO comments
<leader>sFlash jump
<leader><leader>sFlash Treesitter jump

โœ๏ธ Editing

KeyModeAction
jkInsertExit insert mode
<C-h>InsertMove cursor left
<C-j>InsertMove cursor down
<C-k>InsertMove cursor up
<C-l>InsertMove cursor right
<C-d>InsertDelete next character
HNormal / VisualGo to first non-blank character
LNormal / VisualGo to end of line
<C-h>Normal / Visual / OperatorMove left 5 characters
<C-j>Normal / Visual / OperatorMove down 5 lines
<C-k>Normal / Visual / OperatorMove up 5 lines
<C-l>Normal / Visual / OperatorMove right 5 characters
<C-a>NormalSelect all
<leader>yNormalYank to system clipboard
<leader>pNormalPaste from system clipboard

๐Ÿงฉ Completion

KeyAction
<C-n>Select next completion item
<C-p>Select previous completion item
<C-space>Show completion or documentation
<C-e>Hide completion menu
<CR>Accept completion item
<Tab>Select next item or jump forward in snippet
<S-Tab>Select previous item or jump backward in snippet

๐Ÿงช Code And LSP

KeyAction
gdGo to definition
grRename symbol
KHover documentation
<leader>caCode action
<leader>cfFormat buffer
<leader>clLint buffer
<leader>cxWorkspace diagnostics
<leader>cXCurrent buffer diagnostics
<leader>oDocument symbols

๐ŸŒฟ Git

KeyAction
<leader>gdOpen Diffview
<leader>ghCurrent file Git history
<leader>gHRepository Git history
<leader>gqClose Diffview
<leader>gpPreview hunk
<leader>grReset hunk
<leader>gbBlame current line
<leader>gfDiff current file
<leader>gBToggle line blame
<leader>gLToggle deleted lines

๐Ÿ–ฅ๏ธ Terminal

KeyModeAction
<leader>ttNormalToggle floating terminal
<leader>ggNormalToggle Lazygit
<C-\>Normal / TerminalToggle terminal
<Esc>TerminalExit terminal mode

๐Ÿงท Session And Folds

KeyAction
<leader>qsRestore session
<leader>qlRestore last session
<leader>qdStop session persistence
zROpen all folds
zMClose all folds
zpPreview folded lines

๐Ÿฉบ Health Check

Useful commands when something breaks:

:Lazy
:Lazy profile
:checkhealth lazy
:checkhealth vim.lsp
:checkhealth nvim-treesitter
:Mason
:ConformInfo

For a quick headless smoke test:

nvim --headless '+lua print("config loaded")' '+qa'

๐Ÿ› ๏ธ Customization

  • Add plugins in the matching file under lua/plugins/.
  • Add language servers and tools in lua/plugins/lsp.lua.
  • Add editor options in lua/options.lua.
  • Add global keymaps in lua/mappings.lua.
  • Add snippets under snippets/.

Keep plugin config inside lazy specs when possible. It keeps load order, keymaps, and options in one place.

๐Ÿ“ Notes

This config tracks current Neovim APIs and targets Neovim 0.12+. If you need compatibility with older Neovim releases, the LSP setup will need changes.

๐Ÿ“„ License

MIT