This is what I've found to work well for me. This README.md was mostly generated by cursor-agent.
nvim/
├── init.lua # Entry point
├── lua/
│ ├── config/
│ │ ├── init.lua # Core config, keymaps, custom commands
│ │ ├── lazy.lua # Lazy.nvim setup
│ │ └── options.lua # Neovim options
│ └── plugins/
│ └── *.lua # ~ one file per plugin
└── queries/
└── all/
└── textobjects.scm # Custom tree-sitter text objects
Each plugin has its own file in lua/plugins/. The config/ directory holds core setup.
- lazy.nvim - Plugin manager
- tokyonight.nvim - Colorscheme
- mason.nvim + mason-lspconfig.nvim - LSP server management
- nvim-lspconfig - Sensible defaults for most LSPs
- lazydev.nvim - Configure
lua_lsfor nvim config code - inlay-hints.nvim - LSP inlay hints
- fidget.nvim - LSP progress indicator
- nvim-treesitter + nvim-treesitter-textobjects + nvim-treesitter-context - Syntax highlighting and text objects
- lualine.nvim - Status line
- noice.nvim - Enhanced UI for messages and cmdline
- nvim-colorizer.lua - Color code highlighting
- telescope.nvim + fzf-native - Search tool
- flash.nvim - Smart jump navigation
- oil.nvim - File explorer
- conform.nvim - Formatting engine
- mini.surround - Surround utilities
- treesj - Split/join code structures
- trouble.nvim - Diagnostics viewer
- snacks.nvim - Utility collection (indent guides, scope highlighting, image previews, opening in git web client, scratch buffers, various option toggles)
- which-key.nvim - Keymap helper
- cellular-automaton.nvim - For fun
Format on save via Conform, with a toggle system (:FormatDisable, :FormatEnable, :FormatToggle, :FormatStatus) that works globally or per-buffer. Formatters: Prettier for web languages, stylua for Lua, rustfmt for Rust, ruff_format (or black/isort) for Python.
Text objects for functions, classes, parameters, blocks, and comments (custom query adds comment text objects). Movement and swap operations configured. Many parsers auto-installed.
Mason auto-installs lua_ls, rust_analyzer, and zls. Install whatever else you need through Mason.
4-space indentation, relative line numbers, persistent undo (~/.vim/undodir), no swap/backup files, cursor line highlighting, smart case search, inlay hints enabled.
- Neovim 0.9+ required
- Clone to
~/.config/nvim - Start Neovim - lazy.nvim will install itself and plugins
- Use a lot of
:hand<leader>f?(search help tags with Telescope). - There are a lot of useful Telescope commands
- Make good use of treesitter to select things
