Skip to content
 
 

Latest commit

 

History

228 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

♡   LÖVE docs  ♡

Generate love2d-docs License Lua LÖVE API Neovim Vim

Comprehensive documentation 📚

✨ About

love2d-docs.nvim is a comprehensive plugin for Neovim and Vim that brings the entire LÖVE game framework documentation right into your editor.

  • 📖 Built-in Help — Complete LÖVE API documentation accessible via :help LOVE-*

Table of Contents

📦 Installation

require("lazy").setup({
    "yorik1984/love2d-docs.nvim",
    branch = "main", -- default or `branch = "11.5"` for special API version
    ft = "lua",
})
Plug "yorik1984/love2d-docs.nvim"

📚 Documentation

Access the complete LÖVE API documentation :help LOVE-*:

What to find Command Example Alias
Function :help LOVE-love.window.setMode :help love-love.window.setMode
Type :help LOVE-File :help love-File
Type Method :help LOVE-File:isEOF :help love-File:isEOF
Enum :help LOVE-BufferMode :help love-BufferMode

🔄 Rebuilding the API

🤖 Automated Workflow

This plugin uses GitHub Actions to automatically stay up-to-date with the latest LÖVE API:

Feature Details
Schedule Every Monday at 00:30 UTC
Trigger Manual dispatch via Actions tab
Source love2d-community/love-api
Updates Documentation

How it works:

  1. 🔄 Fetches the latest LÖVE API specification
  2. 📝 Generates help files (love2d-docs.txt)
  3. 🚀 Automatically commits changes to the repository
  4. 📌 Creates version branches (e.g., 11.5, 12.0) for API version tracking

Note

The badge at the top of this README always shows the current LÖVE API version supported by this plugin.

✋ Manual Generation (Optional)

Tip

You don't need to do this! The automated workflow keeps everything up-to-date.
Manual generation is only for:

  • Testing custom modifications
  • Contributing to plugin development
  • Offline environments without GitHub Actions

If you still want to generate files manually:

  • Prerequisites:
# Ensure these are installed
git --version
lua -v           # Lua 5.1
nvim --version   # or vim
  • Configure (optional): Edit build/env.txt to set custom paths:
lua="lua5.1"     # Change to your Lua version
nvim="nvim"      # or "vim"
  • Run the generator:
# On Linux/Mac
chmod +x build/gen.sh
./build/gen.sh

# On Windows
build/gen.bat

🎨 Screenshots

Neovim with newpaper.nvim

Neovim screenshot 1
Vim screenshot

📚 References & Related Projects

  • love2d-snippets
    A snippet generator and collection for the LÖVE framework, compatible with VS Code, Neovim (via LuaSnip), and any editor that supports VS Code-style snippets.

    • 🤖 Automated Updates: GitHub Actions parses the official love-api and generates up-to-date snippets whenever the API changes.
    • 📦 Full API Coverage: Includes snippets for all modules, functions, callbacks, type methods, constructors, getters/setters, enums, and conf.lua.
    • ⌨️ Tabs for Indentation: Uses tab characters (\t) for indentation, allowing each developer to configure their preferred display width (2, 4, 8 spaces, etc.) without changing the actual files.
    • 📌 Version Branches: Repository branches match LÖVE versions (e.g., branch 11.5 for LÖVE 11.5), while the main branch always contains the latest API.
  • love2d-definitions
    LuaCATS definition for LÖVE framework. Creates ---@class and ---@alias definitions for perfect autocompletion and type checking in IDEs with LuaCATS.

    • 🤖 Automated Updates: Uses GitHub Actions to stay in sync with the official love-api, just like this plugin.
    • 📦 Ready-to-Use: Provides a pre-generated library/ folder that you can directly add to your workspace library.
    • 🧠 Smart Type System: Intelligently handles type unions, plural forms (e.g., tablestable[]), optional parameters, and function overloads.
    • 📌 Version Branches: Includes branches for specific LÖVE versions (e.g., 11.5), so you can use annotations that match your project.
  • love2d-tresitter.nvim
    Is a comprehensive plugin for Neovim that highlight LÖVE syntax in your editor. Provides complete LÖVE API syntax highlighting for LÖVE functions, modules, types, and callbacks, with full Treesitter support.

    • 🤖 Automated Updates: Uses GitHub Actions to stay in sync with the official love-api, just like this plugin.
    • ⚙️ Fully Customizable: Offers flexible styling options for colors and font styles (bold, italic, etc.).
    • 📌 Version Branches: Maintains version-specific branches (e.g., 11.5) to match different LÖVE releases.
  • love2d-vim-syntax
    Plugin for Vim that highlight LÖVE syntax in your editor.

    • 🎨 Syntax Highlighting — Colors LÖVE functions, modules, types, and callbacks
    • 🔧 Customizable — Flexible styling options for Vim

🙏 Credits

Built with ♡ for the LÖVE community
Report Issue · Discussion · LÖVE

About

(Neo)Vim plugin for LÖVE API doc help file

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages