Skip to content

benbrastmckie/.config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeoTex: AI-Powered NeoVim for Research, Development, and System Management

A modern NeoVim configuration built for AI-assisted coding, LaTeX typesetting, formal verification with Lean, NixOS system management, and multi-language development with comprehensive LSP support and Git workflow integration.

Core Focus Areas

1. AI-Assisted Development

Multi-Provider AI Integration for intelligent coding assistance:

  • Claude Code - Advanced coding assistant with multi-provider support and custom system prompts
  • Lectic - Persistent AI conversations for research and knowledge management
  • Avante - AI-powered code completion, refactoring, and inline suggestions with Claude, GPT, and Gemini support
  • MCP Hub - Model Context Protocol integration for extended AI capabilities
  • Git Worktrees + OpenCode - Parallel AI-assisted development across multiple branches

Quick Access: <leader>aa (Avante), <C-c> (Claude Code), <leader>ml (Lectic)

2. Professional LaTeX Typesetting

Comprehensive Academic Writing Environment:

  • VimTeX - Full-featured LaTeX editing with live compilation and PDF viewing
  • Custom Templates - Article, book, beamer presentations, and publisher-specific templates
  • Citation Management - Zotero integration with BibTeX synchronization
  • Math Support - LaTeX-specific surrounds, snippets, and intelligent text objects
  • PDF Integration - Synchronized forward/inverse search with PDF viewers
  • Multi-file Projects - Chapter management, bibliography handling, and cross-referencing

See: Research Tooling Documentation

3. NixOS System Management

Integrated System Configuration:

  • Flake Management - Rebuild system configurations from within NeoVim
  • Home Manager - Apply user-specific configuration changes
  • Package Operations - Update dependencies and clean old generations
  • Development Shells - Enter nix-shell environments for project dependencies
  • Quick Resources - Direct access to NixOS package search and configuration tools

Quick Access: <leader>n prefix for all NixOS operations

See: NIX Workflows Documentation

If you are interested in using NixOS, you can find my .dotfiles here.

4. Formal Verification with Lean

Interactive Theorem Proving Environment:

  • Lean 4 Language Server - Full LSP support with intelligent completion and diagnostics
  • Infoview Integration - Live goal state display and tactic feedback
  • Proof Navigation - Jump to definitions, find references, hover documentation
  • Unicode Input - LaTeX-style abbreviations for mathematical symbols
  • Project Management - Support for Lean projects with dependencies and imports

See: Formal Verification Documentation

5. Modern Language Development

Comprehensive LSP Support with intelligent code assistance for:

  • Programming: Python, Rust, Go, TypeScript/JavaScript, Lua, Nix, C/C++, Java, Shell
  • Markup: LaTeX, Markdown, HTML/CSS
  • Data: JSON, YAML, TOML
  • Specialized: Jupyter notebooks, Lean 4 theorem proving

Features: Auto-completion, diagnostics, go-to-definition, references, refactoring, formatting

See: LSP Configuration

6. Git Workflow Integration

Professional Version Control:

  • Neogit - Comprehensive Git interface with Magit-style workflows
  • Gitsigns - Inline git blame, hunk operations, and diff viewing
  • Diffview - Side-by-side diff viewing and merge conflict resolution
  • Telescope Git - Search commits, branches, and file history
  • Git Worktrees - Multi-branch parallel development support

Quick Access: <leader>g prefix for all Git operations

Key Features

Screenshot of the configuration

Advanced AI Capabilities

  • Multi-Provider Support - Switch between Claude, GPT, and Gemini on-the-fly
  • Custom System Prompts - Create task-specific AI behaviors
  • Context-Aware Assistance - AI understands project structure and file relationships
  • Inline Editing - Visual selection editing with AI suggestions
  • Parallel Development - Multiple AI sessions across git worktrees

Academic Writing Excellence

  • Template System - Pre-configured templates for articles, books, presentations, and publishers
  • Live Preview - Synchronized PDF viewing with forward/inverse search
  • Citation Tools - Zotero integration with smart bibliography management
  • Collaborative Workflows - Git-based version control for academic papers
  • Markdown Support - Pandoc integration for format conversion

Formal Verification Tools

  • Lean 4 Integration - Interactive theorem proving with live feedback
  • Infoview - Real-time proof state visualization and goal tracking
  • Unicode Math - LaTeX-style input for mathematical notation
  • Proof Navigation - Seamless jumping between definitions and theorems
  • Project Support - Full support for Lean projects with dependencies

Development Productivity

  • Treesitter - Advanced syntax highlighting and code understanding
  • Telescope - Fuzzy finding for files, text, commands, and symbols
  • Which-Key - Discoverable keybindings with contextual menus
  • Session Management - Persistent workspaces with project-specific layouts
  • Terminal Integration - Built-in terminal with seamless window navigation
  • Debugging - DAP integration for multi-language debugging

System Integration

  • NixOS Native - Deep integration with Nix package management
  • Clipboard Sync - System clipboard integration across SSH
  • File Watching - Automatic buffer reload on external changes
  • Notifications - Unified notification system with intelligent filtering
  • Performance - Optimized startup and lazy-loading for fast responsiveness

Installation Guides

Select your operating system for detailed setup instructions:

Quick Start: See Installation Guide for prerequisites and setup steps.

Configuration Structure

~/.config/nvim/
├── init.lua                 # Main entry point
├── lua/neotex/              # Core configuration
│   ├── bootstrap.lua        # Plugin manager setup
│   ├── config/              # Core settings
│   │   ├── autocmds.lua     # Automatic commands
│   │   ├── keymaps.lua      # Key mappings
│   │   └── options.lua      # Neovim options
│   ├── plugins/             # Plugin configurations (by category)
│   │   ├── ai/              # AI integration (Avante, Claude Code, MCP)
│   │   ├── editor/          # Editor enhancements (which-key, telescope)
│   │   ├── lsp/             # Language server configurations
│   │   ├── text/            # Text processing (LaTeX, Markdown, Jupyter)
│   │   ├── tools/           # Development tools (git, snippets, REPL)
│   │   └── ui/              # UI components (statusline, explorer)
│   ├── core/                # Core functionality
│   └── util/                # Utility functions
├── docs/                    # Comprehensive documentation
│   ├── INSTALLATION.md      # Setup guide
│   ├── ARCHITECTURE.md      # System design
│   ├── MAPPINGS.md          # Complete keybinding reference
│   ├── AI_TOOLING.md        # AI workflows and git worktrees
│   ├── RESEARCH_TOOLING.md  # LaTeX and academic writing
│   ├── NIX_WORKFLOWS.md     # NixOS integration
│   └── ...                  # Additional documentation
├── templates/               # LaTeX document templates
├── snippets/                # Code snippet collections
└── after/ftplugin/          # Language-specific configurations

Documentation

This configuration features comprehensive documentation for all systems:

Essential Guides

Specialized Documentation

Module Documentation

Every directory includes a README with detailed module documentation:

Quick Start

First Time Setup

  1. Install Prerequisites - Follow platform-specific installation guide
  2. Clone Configuration - Place in ~/.config/nvim/
  3. Run Health Check - Open NeoVim and run :checkhealth
  4. Configure AI - Set API keys for Claude/GPT (see AI Tooling)
  5. Customize - Adjust keymaps and settings to your workflow

Essential Keybindings

Leader Key: <space>

Category Key Action
AI <leader>aa Open Avante AI chat
<C-c> Toggle Claude Code
<leader>ml Lectic markdown AI
Files <C-p> Find files (Telescope)
<leader>sg Search text in project
<leader>e Toggle file explorer
Git <leader>gg Open Neogit
<leader>gb Git blame
<leader>gd Diff view
LSP gd Go to definition
gr Find references
<leader>ca Code actions
LaTeX <leader>ll Compile LaTeX
<leader>lv View PDF
<leader>lt Toggle table of contents
NixOS <leader>nr Rebuild system
<leader>nu Update flake
<leader>nh Home manager

See: Complete Mappings for full keybinding reference

AI-Assisted Workflows

Parallel Development with Git Worktrees

Use multiple AI sessions across different branches simultaneously:

# Create feature worktrees
git worktree add ../project-feature-a feature/authentication
git worktree add ../project-feature-b feature/api-endpoints

# Start AI sessions in each worktree
cd ../project-feature-a && nvim  # Avante session 1
cd ../project-feature-b && nvim  # Avante session 2

See: AI Tooling Guide for complete workflow documentation

Multi-Provider AI Support

Switch AI providers and models on-the-fly:

  • <leader>ap - Select provider (Claude, GPT, Gemini)
  • <leader>am - Select model for current provider
  • <leader>ar - Resume previous AI session

Customization

The configuration is designed for easy customization:

  1. Add Plugins: Edit lua/neotex/plugins/*.lua files using lazy.nvim format
  2. Modify Keymaps: Update lua/neotex/config/keymaps.lua
  3. Configure LSP: Add language servers in lua/neotex/plugins/lsp/
  4. Create Templates: Add LaTeX templates to templates/ directory
  5. Extend AI: Customize system prompts in AI plugin configurations

See: Configuration Guide for detailed customization instructions

System Requirements

  • Neovim 0.10.0 or newer
  • Git 2.23 or newer (for worktree support)
  • Node.js 16 or newer (for LSP and AI integrations)
  • Python 3.7 or newer (for debugger and tools)
  • LaTeX distribution (TeX Live or MiKTeX) for LaTeX support
  • NixOS (optional) - for Nix-specific features

Additional Tools: ripgrep, fd, fzf, tree-sitter CLI (see Installation Guide)

Learning Resources

NixOS Integration

For NixOS users, this configuration integrates seamlessly with system management:

  • Dedicated keybindings for system rebuilds and package management
  • Nix language server support with intelligent completion
  • Integration with home-manager for user configuration
  • Access to NixOS package search and documentation

See: .dotfiles Repository for complete NixOS configuration

Community & Support

  • Issues & Features: GitHub Issues
  • Pull Requests: Contributions welcome! See contribution guidelines
  • Questions: Check existing issues or open a new discussion

License

This configuration is available under the MIT License.

About

NeoVim configuration optimized for writing in LaTeX with AI integration for Avante, Lectic, and Claude-Code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published