← All blog series

Learn Lua with NeoVim

Learn Lua programming and Neovim at the same time — variables, types, strings, numbers, booleans, conditionals, logical operators, tables, functions and modules. 32-lesson series run inside Neovim.

32 posts

0
Learn Lua in Neovim: Hello World with print() & :!lua % | Episode 1

Learn Lua in Neovim: Hello World with print() & :!lua % | Episode 1

Sandy Lane•Video•Quiz available
1
Learn Lua in Neovim: Variables and Types — local, type() & Nil | Episode 2

Learn Lua in Neovim: Variables and Types — local, type() & Nil | Episode 2

Sandy Lane•Video•Quiz available
2
Learn Lua in Neovim: Numbers and Arithmetic — Operators & Receipt Calculator | Episode 3

Learn Lua in Neovim: Numbers and Arithmetic — Operators & Receipt Calculator | Episode 3

Sandy Lane•Video•Quiz available
3
Lua for Beginners: String Creation, .., # Length & string.upper/lower | Episode 4

Lua for Beginners: String Creation, .., # Length & string.upper/lower | Episode 4

Sandy Lane•Video•Quiz available
4
Learn Lua in Neovim: Booleans, Nil & Comparisons — The Truthy Gotcha | Episode 5

Learn Lua in Neovim: Booleans, Nil & Comparisons — The Truthy Gotcha | Episode 5

Sandy Lane•Video•Quiz available
5
Learn Lua in Neovim: Comments & User Input — io.read() & tonumber() | Episode 6

Learn Lua in Neovim: Comments & User Input — io.read() & tonumber() | Episode 6

Sandy Lane•Video•Quiz available
6
Learn Lua in Neovim: If Statements — if, elseif, else & Grade Calculator | Episode 7

Learn Lua in Neovim: If Statements — if, elseif, else & Grade Calculator | Episode 7

Sandy Lane•Video•Quiz available
7
Learn Lua in Neovim: Logical Operators — and, or, not & Ternary Idiom | Episode 8

Learn Lua in Neovim: Logical Operators — and, or, not & Ternary Idiom | Episode 8

Sandy Lane•Video•Quiz available
8
Learn Lua in Neovim: Numeric For Loops — Count, Step & Countdown | Episode 9

Learn Lua in Neovim: Numeric For Loops — Count, Step & Countdown | Episode 9

Sandy Lane•Video•Quiz available
9
Lua in Neovim: While and Repeat Loops — Conditions, Halving & Choosing the Right Loop | Episode 10

Lua in Neovim: While and Repeat Loops — Conditions, Halving & Choosing the Right Loop | Episode 10

Sandy Lane•Video•Quiz available
10
Lua in Neovim: Break and Nested Loops — Star Patterns & Finding Divisible Numbers | Episode 11

Lua in Neovim: Break and Nested Loops — Star Patterns & Finding Divisible Numbers | Episode 11

Sandy Lane•Video•Quiz available
11
Learn Lua in Neovim: Functions — Basics, Parameters vs Arguments & return | Episode 12

Learn Lua in Neovim: Functions — Basics, Parameters vs Arguments & return | Episode 12

Sandy Lane•Video•Quiz available
12
Learn Lua in Neovim: Multiple Returns and Variadics — return a, b and ... | Episode 13

Learn Lua in Neovim: Multiple Returns and Variadics — return a, b and ... | Episode 13

Sandy Lane•Video•Quiz available
13
Learn Lua in Neovim: Variable Scope — local Keyword, Block Scope & Always Use Local | Episode 14

Learn Lua in Neovim: Variable Scope — local Keyword, Block Scope & Always Use Local | Episode 14

Sandy Lane•Video•Quiz available
14
Learn Lua in Neovim: First-Class Functions — Store, Pass & Filter with Functions | Episode 15

Learn Lua in Neovim: First-Class Functions — Store, Pass & Filter with Functions | Episode 15

Sandy Lane•Video•Quiz available
15
Lua with Neovim: Closures — Upvalues, Counter Factory & Functions That Remember | Episode 16

Lua with Neovim: Closures — Upvalues, Counter Factory & Functions That Remember | Episode 16

Sandy Lane•Video•Quiz available
16
Learn Lua in Neovim: Tables as Arrays — 1-Based Indexing, Insert, Remove & Length | Episode 17

Learn Lua in Neovim: Tables as Arrays — 1-Based Indexing, Insert, Remove & Length | Episode 17

Sandy Lane•Video•Quiz available
17
Learn Lua in Neovim: Table Array Operations — Sort, Concat & Custom Comparators | Episode 18

Learn Lua in Neovim: Table Array Operations — Sort, Concat & Custom Comparators | Episode 18

Sandy Lane•Video•Quiz available
18
Lua with Neovim: Tables as Dictionaries — Key-Value Pairs, Dot & Bracket Notation | Episode 19

Lua with Neovim: Tables as Dictionaries — Key-Value Pairs, Dot & Bracket Notation | Episode 19

Sandy Lane•Video•Quiz available
19
Learn Lua in Neovim: Iterating Tables — pairs, ipairs, Gap Behavior & Word Counter | Episode 20

Learn Lua in Neovim: Iterating Tables — pairs, ipairs, Gap Behavior & Word Counter | Episode 20

Sandy Lane•Video•Quiz available
20
Lua with Neovim: Nested Tables — Tables Inside Tables, Chained Access & Averages | Episode 21

Lua with Neovim: Nested Tables — Tables Inside Tables, Chained Access & Averages | Episode 21

Sandy Lane•Video•Quiz available
21
Learn Lua in Neovim: Table References vs Copies — The Copy Trap, Shallow & Deep Copy | Episode 22

Learn Lua in Neovim: Table References vs Copies — The Copy Trap, Shallow & Deep Copy | Episode 22

Sandy Lane•Video•Quiz available
22
Learn Lua in Neovim: Math & String Libraries — floor, random, sub, format & Dice Roller | Episode 23

Learn Lua in Neovim: Math & String Libraries — floor, random, sub, format & Dice Roller | Episode 23

Sandy Lane•Video•Quiz available
23
Lua with NeoVim: Modules and Require — local M = {}, return M & require() | Episode 24

Lua with NeoVim: Modules and Require — local M = {}, return M & require() | Episode 24

Sandy Lane•Video•Quiz available
24
Lua with Neowin: String Patterns — %a %d %s %w, Quantifiers, match & gmatch | Episode 25

Lua with Neowin: String Patterns — %a %d %s %w, Quantifiers, match & gmatch | Episode 25

Sandy Lane•Video•Quiz available
25
Lua with Neowin: File I/O — io.open, Read Modes, Write Modes & io.lines | Episode 26

Lua with Neowin: File I/O — io.open, Read Modes, Write Modes & io.lines | Episode 26

Sandy Lane•Video•Quiz available
26
Lua for Beginners: Error Handling — Handling Things That Go Wrong with pcall & assert | Episode 27

Lua for Beginners: Error Handling — Handling Things That Go Wrong with pcall & assert | Episode 27

Sandy Lane•Video•Quiz available
27
Lua with Neovim: Type Conversion — Automatic Coercion, Safe Defaults & Explicit Casts | Episode 28

Lua with Neovim: Type Conversion — Automatic Coercion, Safe Defaults & Explicit Casts | Episode 28

Sandy Lane•Video•Quiz available
28
Lua with Neovim: Metatables — __tostring, __add, __eq, __index & Custom Table Behavior | Episode 29

Lua with Neovim: Metatables — __tostring, __add, __eq, __index & Custom Table Behavior | Episode 29

Sandy Lane•Video•Quiz available
29
Lua with Neowin: OOP with Metatables — __index, :new(), Colon Syntax & Inheritance | Episode 30

Lua with Neowin: OOP with Metatables — __index, :new(), Colon Syntax & Inheritance | Episode 30

Sandy Lane•Video•Quiz available
30
Lua for Neovim: The Neovim Lua API — vim.api, vim.opt, vim.keymap.set & Autocommands | Episode 31

Lua for Neovim: The Neovim Lua API — vim.api, vim.opt, vim.keymap.set & Autocommands | Episode 31

Sandy Lane•Video•Quiz available
31
Lua with Neovim: Writing a Neovim Plugin — Plugin Structure, Setup Pattern & Custom Commands | Ep 32

Lua with Neovim: Writing a Neovim Plugin — Plugin Structure, Setup Pattern & Custom Commands | Ep 32

Sandy Lane•Video•Quiz available