A robust, performant Neovim configuration optimized for Python, JavaScript/TypeScript, Lua, Bash, SQL, YAML, and Markdown development.
Version: 1.2.0
Last Updated: 2025-11-08
Repository: https://github.com/johnmathews/neovim
- Full LSP Support - Language servers for 10+ languages via Mason
- Fuzzy Finding - Telescope with multiple search modes and extensions
- Git Integration - Gitsigns for inline blame, diffs, and staging
- Smart Completion - nvim-cmp with LuaSnip snippets
- Syntax Highlighting - Treesitter with custom text objects
- Fast Navigation - Leap motion, Harpoon marks, and project management
- Performance - Lazy-loaded plugins, ~350ms startup time
- Testing - Automated LSP testing and comprehensive test suite
- Documentation - Detailed guides for LSP, keymaps, and performance
-
Neovim: v0.11.4+
-
Node.js: v18+ (for LSP servers)
-
CLI Tools:
brew install luacheck stylua ripgrep fd glow
glowpowers the in-editor Markdown preview described below. -
Optional:
pynvimfor Python support
# Backup existing config
mv ~/.config/nvim ~/.config/nvim.backup
# Clone this repository
git clone https://github.com/johnmathews/neovim.git ~/.config/nvim
# Launch Neovim (plugins will auto-install)
nvim
# Install LSP servers via Mason
:Mason- Install git hooks: Run
./scripts/install-hooksto enable automatic quality checks - Check health:
:checkhealthor run./scripts/health-check - View keymaps:
<Tab>tkor see KEYMAPS.md - Configure LSP: See LSP.md for language server setup
- Test LSP: Run
./test/test_lsp.shto verify LSP attachment
Prefix: <Tab> (all Telescope commands start with Tab)
| Keymap | Function |
|---|---|
<Tab>f |
Find files (respects .gitignore) |
<Tab>a |
Find all files |
<Tab>s |
Search text (ripgrep) |
<Tab>x |
Search with ripgrep args |
<Tab>r |
Recent buffers |
<Tab>tk |
Search keymaps |
<Tab>tc |
Command history |
<Tab>gc |
Git commits |
<Tab>gb |
Git branches |
<Tab>z |
Resume last search |
Telescope Extensions:
fzf-native- Better performance and FZF syntax supportlive_grep_args- Pass arguments to ripgrep (e.g.,--no-ignore,-tpy)smart_history- Persistent search historyproject- Project management
Available via Mason: Python (pyright), Lua (lua_ls), JavaScript/TypeScript (ts_ls), YAML (yamlls), Bash, JSON, SQL, Markdown, HTML, CSS
| Keymap | Function |
|---|---|
K |
Hover documentation |
gd |
Go to definition |
gD |
Go to declaration |
gr |
Go to references |
gi |
Go to implementation |
<leader>rn |
Rename symbol |
<leader>ca |
Code actions |
<leader>cf |
Format document |
[d |
Previous diagnostic |
]d |
Next diagnostic |
<leader>q |
Diagnostic quickfix list |
LSP Documentation: See LSP.md for detailed server configurations and troubleshooting.
| Keymap | Function |
|---|---|
<leader>sb |
Blame current line |
<leader>sS |
Stage buffer |
<leader>su |
Undo stage hunk |
<leader>sr |
Reset hunk |
<leader>sp |
Preview hunk |
]c |
Next git hunk |
[c |
Previous git hunk |
Visual Indicators:
|- Added or changed line_- Deleted line~- Changed line number
Leap Motion:
s- Jump forward by 2-character searchS- Jump backward by 2-character search- Type 2 characters β see labeled jump points β press label
Harpoon (Quick Marks):
<leader>ha- Add file to harpoon<leader>hh- Toggle harpoon menu<leader>h1-4- Jump to harpooned file 1-4
Marks:
m,- Create next available markm;- Toggle mark at current linedmx- Delete mark xdm<space>- Delete all marks in bufferm]- Next markm[- Previous mark
Prefix: <C-w> (Control+W, then see which-key options)
| Keymap | Function |
|---|---|
<C-w>s |
Horizontal split |
<C-w>v |
Vertical split |
<C-w>H |
Rotate layout counterclockwise |
<C-w>J/K/L |
Rotate layout other directions |
<C-w>q |
Close window |
<C-w>= |
Equalize window sizes |
| Keymap/Command | Function |
|---|---|
<leader>mg |
Open a live Glow preview for the current Markdown buffer |
:Glow |
Manually trigger the Glow preview command |
Details:
- Uses glow.nvim with a 120-column floating window, rounded border, and 85% screen height.
- Automatically lazy-loads when editing Markdown, running
:Glow, or pressing<leader>mg. - Requires the
glowCLI (install viabrew install glow). - Falls back with a warning if the CLI is missing so you know why the preview did not start.
~/.config/nvim/
βββ init.lua # Entry point
βββ lua/
β βββ options.lua # Neovim options
β βββ mappings.lua # Keybindings
β βββ autocmd.lua # Autocommands
β βββ functions.lua # Custom functions
β βββ colorscheme.lua # Theme configuration
β βββ plugins.lua # Plugin declarations (lazy.nvim)
β βββ plugins/ # Plugin configurations (45 files)
β β βββ lsp.lua # LSP setup
β β βββ telescope.lua # Telescope configuration
β β βββ treesitter.lua # Treesitter setup
β β βββ cmp.lua # Completion configuration
β β βββ ...
β βββ snippets/ # LuaSnip snippets (6 languages)
βββ ftplugin/ # Filetype-specific settings (22 files)
βββ scripts/
β βββ health-check # Configuration health check
β βββ quality-gate # Pre-commit validation
β βββ pre-commit # Git pre-commit hook
βββ test/ # Test files for LSP/linter validation
β βββ test_lsp.sh # Automated LSP testing
β βββ python/ # Python test files
β βββ lua/ # Lua test files
β βββ javascript/ # JavaScript test files
β βββ ...
βββ docs/
βββ AGENTS.md # Architecture & conventions
βββ CHANGELOG.md # Version history
βββ IMPROVEMENTS.md # Enhancement tracking
βββ KEYMAPS.md # Complete keymap reference
βββ LSP.md # LSP documentation
βββ PERFORMANCE.md # Performance analysis
βββ TESTING.md # Testing infrastructure
βββ TEST_RESULTS.md # Latest test results
βββ TESTING_CHANGELOG_GUIDE.md # Testing & changelog guide
# Test LSP attachment (4 languages)
./test/test_lsp.sh
# Run health check
./scripts/health-check
# Run quality gate (linting + formatting)
./scripts/quality-gate- β Health Check: PASS
- β Code Quality: 0 warnings / 0 errors (58 Lua files)
- β LSP Attachment: 4/4 languages (100%)
- β Startup Performance: 350ms (excellent, <500ms threshold)
Detailed Results: See docs/TEST_RESULTS.md
Current Performance:
- Headless startup: ~350ms (average of 5 runs)
- Real-world startup: ~250-280ms (with lazy-loading)
- Plugin count: 88 (8 plugins lazy-loaded)
Lazy-Loaded Plugins:
- Telescope (loads on
<Tab>keypress) - nvim-cmp (loads on
InsertEnter) - LuaSnip (loads on
InsertEnter) - Gitsigns (loads on
BufReadPre) - Alpha dashboard (loads on
VimEnter) - Lualine (loads on
VeryLazy) - Mason (deferred with
run_on_start = false) - Harpoon (loads on keypress)
Performance Guide: See docs/PERFORMANCE.md for detailed analysis and optimization tips.
| Document | Purpose |
|---|---|
| AGENTS.md | Architecture, design principles, conventions |
| CHANGELOG.md | Version history and change tracking |
| IMPROVEMENTS.md | Enhancement implementation details |
| KEYMAPS.md | Complete keymap reference (searchable via <Tab>tk) |
| LSP.md | LSP servers, formatters, linters |
| PERFORMANCE.md | Startup analysis and optimization |
| TESTING.md | Testing infrastructure and CI/CD |
| TEST_RESULTS.md | Latest test execution results |
| TESTING_CHANGELOG_GUIDE.md | Testing & changelog workflows |
# Inside Neovim
:Lazy update
# Check for issues
:Lazy health# Inside Neovim
:Mason
# Or update all
:MasonUpdateAll# Format current buffer
<leader>cf
# Or via command
:lua require('conform').format()# Lint current buffer
<leader>cl
# Or via command
:lua require('lint').try_lint()# Install git hooks (one-time setup)
./scripts/install-hooks
# Test LSP stack
./test/test_lsp.sh
# Full health check
./scripts/health-check
# Quality gate (linting + formatting)
./scripts/quality-gatePre-commit hook (runs before each commit):
- Luacheck validation
- Code formatting check
- Neovim load test
- Common issue detection
Pre-push hook (runs before push to remote):
- Full quality gate
- LSP attachment tests
- Health check
- Documentation validation
Bypass hooks (emergency only):
git commit --no-verify
git push --no-verify- Check LSP status:
:LspInfo - Verify server installed:
:Mason - Check logs:
:LspLog - Run LSP test:
./test/test_lsp.sh - See LSP.md for detailed troubleshooting
- Check startup time:
nvim --startuptime startup.log +qa - Profile plugins:
:Lazy profile - See docs/PERFORMANCE.md for optimization tips
- Check conform status:
:ConformInfo - Verify formatter installed:
:Mason - Check configuration: See docs/LSP.md
- Check plugin health:
:Lazy health - Update plugins:
:Lazy sync - Check Lazy logs:
:Lazy log
This is a personal configuration, but suggestions are welcome!
- Create a feature branch
- Make changes
- Update
CHANGELOG.mdunder[Unreleased] - Run tests:
./scripts/quality-gate - Commit with descriptive message
Follow conventional commits:
feat:- New featurefix:- Bug fixdocs:- Documentation changesperf:- Performance improvementsrefactor:- Code refactoringtest:- Test changes
MIT License - Feel free to use and modify as needed.
Built with:
- lazy.nvim - Plugin manager
- nvim-lspconfig - LSP configuration
- telescope.nvim - Fuzzy finder
- nvim-treesitter - Syntax highlighting
- mason.nvim - LSP installer
And 80+ other amazing plugins. See lua/plugins.lua for complete list.
- Issues: https://github.com/johnmathews/neovim/issues
- Documentation: See docs in this repository
- Neovim Help:
:helpor https://neovim.io/doc/
Enjoy your Neovim experience! π