Beautiful syntax highlighting 📝
love2d-vim-syntax is a comprehensive 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
- 🚀 Features
- 📦 Installation
- 🔧 Settings
- 🔄 Rebuilding the API
- 🎨 Screenshots
- 📚 References & Related Projects
- 🙏 Credits
-- LÖVE functions light up automatically
love.graphics.rectangle("fill", 100, 100, 200, 200)
-- Callbacks are specially highlighted
function love.load()
end
-- Configuration flags in conf.lua get special treatment
function love.conf(t)
t.window.width = 800
t.window.height = 600
endPlug "yorik1984/love2d-vim-syntax"The style of the syntax highlighting can be changed by setting g:love_colors_<name> in your .vimrc:
let g:love_colors_love = 'guifg=#E54D95 ctermfg=162 gui=bold cterm=bold'You can set the string to any valid highlighting specification (see :help highlight-args). Defaults are:
| Highlight Group | Variable Name | Parameters (GUI/CTERM) |
|---|---|---|
| Love | g:love_colors_love |
guifg=#E54D95 ctermfg=162 gui=bold cterm=bold |
| Lovet | g:love_colors_module |
guifg=#E54D95 ctermfg=162 |
| LoveDot | g:love_colors_module |
guifg=#E54D95 ctermfg=162 |
| LoveModule | g:love_colors_module |
guifg=#E54D95 ctermfg=162 |
| LoveType | g:love_colors_type |
guifg=#E54D95 ctermfg=162 |
| LoveFunction | g:love_colors_function |
guifg=#2FA8DC ctermfg=38 |
| LoveMethod | g:love_colors_function |
guifg=#2FA8DC ctermfg=38 |
| LoveCallback | g:love_colors_callback |
guifg=#2FA8DC ctermfg=38 |
| LoveConf | g:love_colors_conf |
guifg=#2FA8DC ctermfg=38 |
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 | Vim syntax files |
How it works:
- 🔄 Fetches the latest LÖVE API specification
- 🎨 Updates syntax highlighting rules
- 🚀 Automatically commits changes to the repository
- 📌 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.
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
- Configure (optional): Edit build/env.txt to set custom paths:
lua="lua5.1" # Change to your Lua version
- Run the generator:
# On Linux/Mac
chmod +x build/gen.sh
./build/gen.sh
# On Windows
build/gen.bat- Generated files:
- 🎨
after/syntax/lua.vim— Vim syntax file - 🧪
test/example/api_full_list.lua— Test preview file with full API-list - ⚙️
test/example/conf.lua— Test previewlove.conf()
- 🎨
-
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.5for LÖVE 11.5), while themainbranch always contains the latest API.
-
love2d-definitions
LuaCATS definition for LÖVE framework. Creates---@classand---@aliasdefinitions 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.,
tables→table[]), 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-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-*
- 📖 Built-in Help — Complete LÖVE API documentation accessible via
-
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.
- Original Author: Davis Claiborne — Created and maintained the original vim-love-docs
- Powered by: love-api — Community-maintained LÖVE API specification

