A Neovim configuration built with Lua and the Lazy.nvim plugin manager. This is my personal setup that focuses on my text-editing needs which primarily includes latex, markdown, lua, python, typescript, and a few other programming languages I occasionally use.
- Search & Navigation: Telescope/snack-picker integration with fuzzy finding, project search, and file navigation
- Advanced LSP: Full Language Server Protocol integration with auto-completion, diagnostics, and code actions
- Custom UI: Custom statusline, tabline, and colorscheme, including toggle-able animations.
- Academic Writing: Comprehensive LaTeX support with VimTeX, custom snippets, and PDF compilation
- Developer Tools: Integrated debugging, terminal, git workflow, and project management
- Performance Optimized: Fast startup with lazy loading and disabled unnecessary providers
nvim/
├── lua/
│ ├── configs/ # Plugin configuration files
│ ├── core-plugins/ # Plugin installation and setup (Lazy.nvim specs)
│ ├── plugins/ # optional additional bundles
│ ├── settings/ # Core Neovim settings, keymaps, and autocommands
│ ├── sources/ # Custom completion sources
│ └── utils/ # Helper functions and utilities
├── LuaSnip/ # Custom LuaSnip snippets (Lua-based, not VSCode format)
├── ftplugin/ # Filetype-specific configurations
├── preamble/ # LaTeX preamble templates and chunks
├── queries/ # Custom Tree-sitter queries
├── spell/ # Custom dictionary words for spellchecker
└── session/ # Session management files (auto-generated)
\
- Main Leader: Actions and commands<Space>
- Navigation Leader: Search, find, and navigation,
- Local Leader: Filetype-specific actions (LaTeX, Markdown, debugging, etc.)
q
closes windows where macro recording isn't needed<Esc>
dismisses notifications and clears search highlighting- WhichKey provides contextual help with 1.5s delay
;
is remapped to:
.- Extensive use of toggle mappings via
[/]
and']o'/']o'
for quick option changes
The statusline displays comprehensive information:
- LSP Status: Active language server with color coding
- Git Integration: Current branch and change indicators
- LaTeX Compilation: Document size and compilation progress/status
- File Information: Name and optional path from project root
- Macro Recording: Shows
q<key>
when recording - Debug Information: Active debugging session details
Key | Action |
---|---|
r |
Refactor code |
R |
Run/execute |
b |
Box text formatting |
d |
Debug operations |
o |
Obsidian integration |
f |
Format code |
h |
Git hunk operations |
S |
Spotify controls |
s |
Case conversion (camelCase/snake_case) |
t |
Toggle windows |
Key | Action |
---|---|
s |
Previous/next misspelled word |
b |
Previous/next buffer |
d |
Previous/next diagnostic |
e |
Swap lines up/down |
<Space> |
Add blank line above/below |
h |
Previous/next git hunk |
j |
Join/unjoin lines |
m /M |
Method start/end |
[ /] |
Block or heading navigation |
t |
Previous/next TODO comment |
z |
Previous/next fold |
Key | Toggle |
---|---|
a |
Auto-chdir |
b |
Light/dark background |
B |
Code block visualization |
c |
Cursorline |
d |
Diff mode |
h |
Search highlighting |
I |
Illuminate plugin |
i |
Ignore case |
l |
Show trailing characters |
L |
LSP start/stop |
s |
Spell checking |
S |
Scroll binding |
T |
Tree-sitter |
u |
Cursor column |
v |
Virtual edit |
w |
Line wrapping |
W |
Window animations |
x |
Cursor crosshair |
Key | Action |
---|---|
<C-g> |
LazyGit |
<C-o> |
Oil file manager |
<C-r> |
Multi-replace |
<C-s> |
Spectre search/replace |
<C-t> |
open terminal |
<C-u> |
Undo tree |
<C-m> |
Mason package manager |
<C-l> |
LSP info |
<c-e> |
File explorer toggle |
d |
Debug UI |
h |
Harpoon |
o |
Outline/symbols |
l |
Lazy plugin manager |
Key | Action |
---|---|
/ |
Fuzzy search in current file |
<Space> |
Browse current directory |
C |
Select colorscheme |
P |
Plugin management |
q |
Quickfix list (Trouble) |
r |
Resume last Telescope search |
T |
Terminal selector |
t |
Table of contents |
d |
Diagnostics menu |
D |
Debug menu |
e |
Editor files |
g |
Grep/search |
l |
LSP menu |
w |
Wiki/notes |
f |
Find submenu |
c |
Config submenu |
Key | Action |
---|---|
B |
Bookmarks |
b |
Open buffers |
c |
Available commands |
f |
Files in current directory |
G |
Git changes |
h |
Help documentation |
k |
Keymaps |
m |
Marks |
n |
Notifications |
o |
Recent files |
p |
Project files |
t |
TODO comments |
u |
Undo history |
Key | Action |
---|---|
c |
Neovim config files |
C |
All config files |
f |
Ftplugin files |
p |
Plugin configurations |
P |
LaTeX preambles |
s |
Snippets |
Key | Action | Mode |
---|---|---|
| |
Temporary vertical split | Normal |
+ |
Edit in new tab | Normal |
_ |
Temporary horizontal split | Normal |
J /K |
Move up/down keeping cursor position | Normal |
L |
LSP hover | Normal |
; |
Command mode (: ) |
Normal |
U |
Redo | Normal |
<C-t> |
Buffer file stack navigation | Normal |
<C-s> |
Show file in tree | Normal |
<C-/> |
Toggle comment | Normal |
<C-;> |
Open terminal | Normal |
>> /<< |
Move function parameters | Normal |
<C-l> |
Auto-fix spelling | Insert |
T |
Tabularize selection | Visual |
c |
Search/replace selection | Visual |
- Lazy.nvim: Plugin manager with lazy loading
- Telescope: Fuzzy finder and search interface
- WhichKey: Contextual keybinding help
- LuaSnip: Snippet engine with custom Lua snippets
- nvim-lspconfig: Language Server Protocol integration
- nvim-treesitter: Syntax highlighting and parsing
- VimTeX: Comprehensive LaTeX support
- nvim-cmp / blink.cmp: Auto-completion engines
- Heirline: Custom statusline configuration
- Alpha: Customizable start screen
- Neo-tree: File explorer sidebar
- Noice: Enhanced UI for messages and notifications
- nvim-dap: Debug Adapter Protocol integration
- Gitsigns: Git integration with line-level changes
- LazyGit: Terminal-based Git UI
- Trouble: Enhanced diagnostics and quickfix list
- Obsidian: Note-taking and knowledge management
- Neorg: Organized note-taking and task management
- Comment: Smart code commenting
- Flash: Enhanced navigation and jumping (optional, disabled by default)
- Neovim 0.10+ (latest stable recommended)
- Git for plugin management
- Node.js for LSP servers and tools
- Python 3 with
pynvim
for Python integration - LaTeX distribution (for LaTeX support)
- Ripgrep for faster searching
- A Nerd Font for icon support
-
Backup your existing config (if any):
mv ~/.config/nvim ~/.config/nvim.backup
-
Clone this configuration:
git clone <your-repo-url> ~/.config/nvim
-
Launch Neovim:
nvim
-
Install plugins: Lazy.nvim will automatically install all plugins on first launch.
-
Install LSP servers: Use
:Mason
to install language servers for your languages.
- Review
lua/settings/options.lua
for personal preferences - Customize colorschemes in
lua/plugins/colorschemes.lua
- Add personal snippets to the
LuaSnip/
directory - Configure LSP servers in
lua/configs/lsp.lua
- LaTeX: Custom snippets, compilation shortcuts, and preamble templates
- Markdown: Enhanced editing with live preview and table formatting
- Python: REPL integration with Iron.nvim and debugging setup
- TypeScript/React: Completion and refactoring tools
- Custom CMP Sources: Located in
lua/sources/
- Helper Functions: Utility functions in
lua/utils/
- LaTeX Preambles: Template chunks in
preamble/
- Spell Checking: Custom dictionary words in
spell/
The local leader (,
) provides filetype-specific functionality:
- Compilation and viewing commands
- Citation and reference tools
- Custom environment insertion
- Table formatting and navigation
- Preview and export options
- Link management
- Breakpoint management
- Step execution controls
- Variable inspection
- Task management
- Journal entries
- Note linking and organization
This configuration prioritizes:
- Efficiency: Minimal keystrokes for common operations
- Consistency: Logical keybinding patterns across contexts
- Performance: Fast startup and responsive editing
- Academic Workflow: Strong support for LaTeX and research writing
- Extensibility: Easy customization and plugin integration
- WhichKey Help: Press any leader key and wait 1.5s for contextual help
- Telescope Commands:
<Space>fk
to browse all keymaps - Plugin Documentation:
:help <plugin-name>
for specific plugins
This configuration assumes familiarity with:
- Vim/Neovim concepts (modes, buffers, windows, tabs)
- Basic Lua scripting
- Command-line tools and development workflows
- LaTeX for academic writing features
Note: This is a personal configuration optimized for specific workflows. While comprehensive, it may require customization for your specific needs.