Lua with Neovim: Nested Tables — Tables Inside Tables, Chained Access & Averages | Episode 21
0views
0011:02
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Real data is rarely flat. In this episode we explore nested tables — tables inside tables. We cover chained access with t.a.b,
build arrays of tables to represent structured data, and compute averages by looping through nested records.
Every keystroke is shown on screen with 3-second pauses so you can follow along at your own pace.
What You'll Learn:
- Nested tables — placing a table inside another table
- Chained access — student.address.city reads deeply nested values
- Modifying nested values through the chain
- Arrays of tables — a list where each element is a dictionary
- Looping through arrays of tables to compute averages
- string.format for rounding decimal output
Neovim Commands Used:
- % — jump between matching braces
- f. — find the next dot character
- ; — repeat the last f/F find
- 5G / 16G — jump to specific line numbers
Timestamps:
0:00 Intro
0:12 Preview
0:44 Open file
1:25 Student table — name, grades, address
2:51 Chained dot access — print nested values
3:32 Modify nested city
3:57 Run student demo
4:16 Classroom — array of student records
5:42 Average loop — sum and divide
8:27 Run final program
8:56 Review — % match braces, f. find dot
9:25 Recap
9:57 Next: Table References vs Copies
Practice code: https://github.com/GoCelesteAI/learn-lua-in-neovim
This is Episode 21 of the Learn Lua in Neovim series. New episodes cover references, copies, libraries, and more — all coded
inside Neovim.
Taught by CelesteAI. Like & subscribe for more tutorials!
#lua #neovim #programming #tutorial #beginners #learnlua #luaprogramming #neovimtutorial #luanestedtables #luadatastructures
#coding
Tags
lua, lua tutorial, learn lua, lua nested tables, lua tables inside tables, lua chained access, lua arrays of tables, lua
computing averages, lua data structures, lua dot notation, lua records, lua for beginners, neovim lua, neovim tutorial, learn
lua in neovim, lua episode 21, programming tutorial, coding tutorial, beginner programming, lua 2026, neovim 2026, screenkey,
code along, lua basics, lua structured data
Tags
lualua tutoriallearn lualua nested tableslua tables inside tableslua chained accesslua arrays of tableslua computing averageslua data structureslua dot notationlua recordslua for beginnersneovim luaneovim tutoriallearn lua in neovim