Lua Mastery
Lua powers Neovim configuration and plugins. Master it to customize your editor and build powerful automation.
Why Lua Matters
| Domain | Applications |
|---|---|
Neovim Configuration |
init.lua, plugin configs, custom keymaps, autocommands |
Plugin Development |
Telescope extensions, custom commands, UI components |
Scripting |
Fast, embeddable scripting language |
Game Development |
Love2D, game engines, mod systems |
Embedded Systems |
Configuration for networking equipment, IoT |
Curriculum
| Module | Description | Level |
|---|---|---|
Variables, types, operators, control flow |
Beginner |
|
Arrays, dictionaries, nested structures |
Beginner |
|
Definitions, closures, variadic functions |
Intermediate |
|
Operator overloading, OOP patterns |
Intermediate |
|
require, module patterns, package path |
Intermediate |
|
Cooperative multitasking, async patterns |
Advanced |
|
vim.*, Neovim API, plugin development |
Advanced |
|
Real patterns from domus-nvim |
Reference |
Quick Reference
Running Lua
# Interactive REPL
lua
# Run script
lua script.lua
# Neovim Lua
:lua print("Hello")
:luafile script.lua
Neovim Lua Path
# Config location
~/.config/nvim/init.lua
# Plugin configs
~/.config/nvim/lua/plugins/*.lua
# Custom modules
~/.config/nvim/lua/mymodule.lua
Projects
| Project | Description | Status |
|---|---|---|
domus-nvim |
Personal Neovim configuration (82 plugins) |
Active |
Custom Plugins |
Telescope extensions, status line |
Planning |
Key Differences from Python
| Lua | Python |
|---|---|
|
|
Tables for everything |
Lists, dicts, tuples |
1-indexed arrays |
0-indexed lists |
|
|
|
|
|
|
|
|
|
Same |