neovim config

July 24, 2026 · View on GitHub

English | 简体中文 | 日本語 | Français | 한국어

A personal, modern Neovim configuration written in Lua and managed with lazy.nvim. Native LSP, Treesitter, Telescope, and a Catppuccin theme — batteries included, tuned for web and Python development.

screenshot

Features

  • Lazy loading — plugins managed by lazy.nvim with a committed lazy-lock.json for reproducible installs
  • 🧠 Native LSPnvim-lspconfig + mason.nvim, servers and tools installed automatically
  • Completionblink.cmp, a fast modern completion engine
  • 🌳 Treesitter — syntax highlighting and incremental selection, plus Treesitter-based text objects
  • 🔭 Telescope — fuzzy finding for files, live grep, LSP symbols, and todos
  • 🎨 Catppuccin theme, lualine statusline, alpha dashboard, which-key hints, and indent guides
  • 🧹 Format & lint on saveconform.nvim (prettier / stylua / isort / black) and nvim-lint (eslint_d / pylint)
  • 💾 Auto session — restore your workspace per project directory
  • 🔧 Git integration via gitsigns and lazygit

Requirements

  • Neovim 0.10 or newer
  • git
  • A Nerd Font (for icons; the config assumes one is set in your terminal)
  • A true-color terminal (iTerm2, WezTerm, Kitty, etc.) — required for termguicolors
  • ripgrep (rg) — for Telescope live grep
  • Node.js — required by several LSP servers and formatters (prettier, etc.)

Installation

git clone git@github.com:dofy/nvim.git ~/.config/nvim

Then launch Neovim:

nvim

On first start, lazy.nvim bootstraps itself and installs all plugins automatically. LSP servers and tools are installed by Mason in the background.

  • Run :Lazy to install / update / clean plugins
  • Run :Mason to manage LSP servers, formatters, and linters
  • Press <Space> (the leader key) and wait to see available keybindings
  • Press g? to view the keybindings screen

Structure

init.lua
├── lua/custom/core/
│   ├── options.lua     # vim.opt settings
│   └── keymaps.lua     # base keymaps (leader = <Space>)
├── lua/custom/lazy.lua # lazy.nvim bootstrap + plugin imports
└── lua/custom/plugins/
    ├── init.lua        # base dependencies (plenary, vim-tmux-navigator)
    ├── lsp/
    │   ├── mason.lua       # Mason + mason-lspconfig + tool installer
    │   └── lspconfig.lua   # nvim-lspconfig + LspAttach keymaps
    └── *.lua           # one file per plugin

To add a plugin, create lua/custom/plugins/<name>.lua returning a lazy.nvim spec table — it is auto-imported.

Plugins

CategoryPlugins
Completionblink.cmp
LSPnvim-lspconfig, mason.nvim, mason-lspconfig, mason-tool-installer
Syntaxnvim-treesitter, nvim-treesitter-textobjects
Files & searchnvim-tree, telescope.nvim
Format & lintconform.nvim, nvim-lint
UIcatppuccin, lualine, alpha, dressing, indent-blankline, which-key
Editingautopairs, substitute.nvim, todo-comments, trouble.nvim
Gitgitsigns, lazygit
Session & miscauto-session, wakatime

Keymaps

Leader key is <Space>. This is a quick reference; press <leader> or g and wait for which-key to show the full list.

Windows & tabs

KeyAction
<leader>sv / <leader>shSplit vertically / horizontally
<leader>se / <leader>sxEqualize splits / close split
<leader>to / <leader>txOpen / close tab
<leader>tn / <leader>tpNext / previous tab
<leader>tfOpen current buffer in a new tab
<leader>nhClear search highlights
jk (insert)Exit insert mode

Find (Telescope) & explorer

KeyAction
<leader>ffFind files in cwd
<leader>frRecent files
<leader>fsLive grep in cwd
<leader>fcGrep string under cursor
<leader>ftFind todos
<leader>eeToggle file explorer
<leader>efToggle explorer on current file
<leader>ec / <leader>erCollapse / refresh explorer

LSP

KeyAction
gd / gRDefinitions / references
gD / gi / gtDeclaration / implementations / type definitions
KHover documentation
<leader>caCode actions
<leader>rnRename symbol
<leader>d / <leader>DLine / file diagnostics
[d / ]dPrevious / next diagnostic
<leader>rsRestart LSP

Editing

KeyAction
s + motion / ss / SSubstitute with motion / line / to end of line
s (visual)Substitute selection
<leader>foFormat file or range
<leader>llTrigger lint
<leader>wr / <leader>wsRestore / save session

LSP & Formatting

LSP servers (auto-installed via mason-lspconfig): ts_ls, denols, html, cssls, tailwindcss, svelte, lua_ls, graphql, emmet_ls, prismals, pyright.

Tools (auto-installed via mason-tool-installer): prettier, stylua, isort, black, pylint, eslint_d.

Formattingconform.nvim, runs on save (manual: <leader>fo):

  • JS / TS / CSS / HTML / JSON / YAML / Markdown / GraphQL → prettier
  • Lua → stylua (2-space indent)
  • Python → isort + black

Lintingnvim-lint, triggers on enter / save / leaving insert (manual: <leader>ll):

  • JS / TS / Svelte → eslint_d
  • Python → pylint

License

MIT