Quick Start Guide
BabaVim: Neovim setup for research workflows.
Prerequisites
macOS: Homebrew Package Manager
If you don't have Homebrew installed:
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"See https://brew.sh/ for more information.
Arch Linux: Pacman and AUR Helper
Ensure your system is up to date:
# Update system
sudo pacman -Syu
# Install AUR helper (yay recommended)
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay && makepkg -siEssential Tools
macOS
# Neovim 0.12+ (install from HEAD as 0.12 is not yet in stable)
brew install neovim --HEAD
# Fuzzy finding utilities
brew install ripgrep fd
# Git interface
brew install lazygit
# Node.js (language servers, markdown preview)
brew install nodeArch Linux
# Neovim 0.12+ (install from AUR as 0.12 is not yet in official repos)
yay -S neovim-nightly-bin
# or
paru -S neovim-nightly-bin
# Fuzzy finding utilities
sudo pacman -S ripgrep fd
# Git interface (AUR)
yay -S lazygit
# Node.js (language servers, markdown preview)
sudo pacman -S nodejs npmAcademic Workflow Tools
macOS
# LaTeX support
brew install --cask mactex-no-gui # or mactex for full installation
# PDF viewer for LaTeX sync
brew install --cask skim
# Typst typesetting
brew install typst
# Julia programming (optional)
brew install julia
# R programming (optional)
brew install rArch Linux
# LaTeX support
sudo pacman -S texlive-most texlive-lang
# PDF viewer for LaTeX sync
sudo pacman -S zathura zathura-pdf-mupdf
# Typst typesetting (AUR)
yay -S typst
# Julia programming (optional, AUR)
yay -S julia-bin
# R programming (optional, AUR)
yay -S rInstallation
Clone Configuration
git clone https://github.com/SimonAB/nvim-config.git ~/.config/nvim
cd ~/.config/nvimFirst Launch
# Launch Neovim - plugins install automatically
nvimFirst launch sequence:
- vim.pack installs plugins (~2 minutes)
- System theme detected and applied
- Mason prompts for language server installation
- Dashboard displays recent files
Essential Keymaps
Navigation (<Space> is leader)
<Space> " Show all available commands (Which-Key)
<Space>f " Find files (Telescope)
<Space>g " Live grep in project
<Space>e " Toggle file explorer
<Ctrl-h/j/k/l> " Navigate between windows
<Shift-h/l> " Navigate between buffersTerminal Integration
<Ctrl-t> " Toggle terminal
<Space>Tt " Terminal toggle (vertical)
<Space>Th " Horizontal terminal
<Space>Tv " Vertical terminal
<Space>Tf " Floating terminal
<Ctrl-i> " Send line to terminal
<Ctrl-c> " Send code block to terminal
<Ctrl-s> " Send visual selection to terminal (visual mode)LSP Operations
gd " Go to definition
K " Show documentation
<Space>Lf " Format document
<Space>Lr " Restart LSP
<Space>LR " Show references
<Space>Ll " List active LSP serversDocument Processing
" LaTeX (localleader is \)
\lv " Forward search (LaTeX → PDF)
\ll " Compile document
\lc " Clean auxiliary files
" Markdown
<Space>Kp " Start preview
<Space>Kt " Toggle preview (or wait for table operations menu)
<Space>Ktf " Format table
<Space>Ktn/Ktp " Navigate table cells
<Space>Kto/KtO " Insert row below/above
<Space>Kti/KtI " Insert column right/left
" Quarto
<Space>Qp " Preview document
<Space>Qr " Render document
" Typst
\tp " Toggle preview
\tc " Compile PDFJulia Development
<Space>Jrh " Horizontal Julia REPL
<Space>Jrv " Vertical Julia REPL
<Space>Jrf " Floating Julia REPL
<Space>Jp " Project status
<Space>Ji " Instantiate project
<Space>Jt " Run testsJulia REPLs: --threads=auto
Configuration
Theme Management
<Space>YTp " Open theme picker (Telescope)
<Space>Yc " Cycle through themes
<Space>YTs " Show current theme
<Space>Yz " Toggle Zen Mode (markdown writing mode)
<Space>z " Quick Zen Mode toggleThemes: Catppuccin, OneDark, Tokyo Night, Nord, GitHub Dark/Light.
Language Server Installation
<Space>MA " Install academic LSP servers (LaTeX, Python, R, Julia)
<Space>MR " Install all recommended servers
<Space>MU " Update all packages
<Space>MS " Show Mason status
:Mason " Open Mason interfaceAcademic workflow servers:
- LaTeX: texlab
- Python: pyright, ruff-lsp
- R: r-languageserver
- Julia: julials
- Lua: lua-language-server
- Markdown: marksman
Spell Checking
<Space>Ys " Toggle spell check
<Space>Yse " Set spell language to English (British)
<Space>Ysf " Set spell language to FrenchLaTeX Workflow Setup
macOS: Configure Skim for SyncTeX
- Open Skim → Preferences → Sync
- Set Preset to: Custom
- Set Command to:
/Users/<username>/.config/nvim/scripts/skim_inverse_search.sh- Use absolute path, no tilde (~)
- Set Arguments to:
%line "%file"
In Skim:
- Cmd+Shift+Click on PDF to jump to corresponding line in Neovim
Arch Linux: Configure Zathura for SyncTeX
VimTeX automatically configures Zathura for inverse search. If needed, create or edit ~/.config/zathura/zathurarc:
Simplest solution (recommended):
set synctex true
set synctex-editor-command "nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\""Alternative (if using nvr):
set synctex true
set synctex-editor-command "nvr --servername /tmp/nvim_server --remote-silent +%{line} '%{input}'"Note: VimTeX may handle this automatically. Test first without manual configuration.
In Zathura:
- Ctrl+Click on PDF to jump to corresponding line in Neovim
Test LaTeX Integration
cd ~/Documents/your-latex-project
nvim main.texIn Neovim:
\ll " Compile document
\lv " Open PDF and jump to cursor positionUnderline, strikethrough, highlight (lua-ul)
This config expects lua-ul with soul-compatible command names (LuaLaTeX/OpenType-friendly). In your preamble use (order matters: luacolor before lua-ul):
\usepackage{luacolor} % required for \hl (highlight); must be before lua-ul
\usepackage[soul]{lua-ul} % provides \ul, \uline, \st, \sout, \hl (same names as soul)Do not load soul or ulem; lua-ul with the [soul] option gives you the same \ul, \st, \hl (and \uline, \sout) with better kerning and OpenType support. The editor will style these commands in the buffer and TOC.
Obsidian Integration
Configure Obsidian vault path in lua/keymaps.lua (line ~709):
local obsidian_path = "/Users/<username>/Library/Mobile Documents/iCloud~md~obsidian/Documents/Notebook"Obsidian Keymaps
<Space>Oo " Find files in Obsidian vault
<Space>On " New note
<Space>Oc " Toggle checkbox
<Space>Op " Paste image
<Space>Ol " Insert link
<Space>Ob " Show backlinksJulia Setup
Install Julia Language Server
using Pkg
Pkg.add("LanguageServer")Julia REPL Workflow
- Open Julia file:
nvim script.jl - Launch REPL:
<Space>Jrv(vertical split) - Send code:
- Current line:
<Ctrl-i> - Code block:
<Ctrl-c> - Selection:
<Ctrl-s>(visual mode)
- Current line:
Project Management
<Space>Jp " Check project status
<Space>Ji " Instantiate dependencies
<Space>Ju " Update packages
<Space>Jt " Run testsTroubleshooting
Plugins Not Loading
:checkhealth " Diagnose issues
:Mason " Verify language servers
:messages " Check error messagesLSP Not Working
<Space>Ll " List active LSP servers
<Space>Lr " Restart LSP
:LspInfo " Check LSP client statusTerminal Issues
# Verify toggleterm installation
nvim -c "lua print(pcall(require, 'toggleterm'))"
# Test terminal mapping
<Space>Th " Try horizontal terminalLaTeX SyncTeX Not Working
macOS (Skim)
# Check script exists
ls ~/.config/nvim/scripts/skim_inverse_search.sh
# Test script manually
~/.config/nvim/scripts/skim_inverse_search.sh 10 "/absolute/path/to/test.tex"
# Check debug log
tail -f /tmp/inverse_search.logArch Linux (Zathura)
# Verify Zathura configuration
cat ~/.config/zathura/zathurarc
# Test inverse search command manually (if configured)
nvim --headless -c "VimtexInverseSearch 10 '/absolute/path/to/test.tex'"
# Or with nvr (if using nvr)
nvr --servername /tmp/nvim_server --remote-silent +10 "/absolute/path/to/test.tex"Feature Discovery
Which-Key Integration
Press <Space> (500ms delay) to view commands grouped by functionality:
- B: Buffer operations
- C: Configuration management
- G: Git operations
- J: Julia development
- L: LSP operations
- M: Mason package management
- Q: Quarto operations
- T: Terminal operations
- Y: Toggle options
Search Keymaps
:WhichKey " Show all keymaps
:WhichKey <Space> " Show leader keymapsNext Steps
- Install language servers:
<Space>MA - Configure theme:
<Space>YTp - Setup LaTeX: Configure Skim for bidirectional sync
- Customise: Add keymaps to
lua/keymaps.lua - Explore: Press
<Space>to view command groups
Advanced Usage
Custom Keymaps
Add to lua/keymaps.lua:
vim.keymap.set("n", "<leader>custom", function()
-- Your custom functionality
end, { desc = "Custom command" })Adding Plugins
Edit lua/plugins.lua:
local essential_plugins = {
{ url = "https://github.com/user/plugin", name = "plugin" },
}Resources
Press <Space> to view available commands.