Lua with Neovim: Tables as Dictionaries — Key-Value Pairs, Dot & Bracket Notation | Episode 19
6views
0010:45
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Tables aren't just arrays — they're also dictionaries. In this episode we build key-value tables with the {key = value}
constructor, access values with dot notation and bracket notation, add new keys, update existing ones, and delete keys by
assigning nil.
Every keystroke is shown on screen with 3-second pauses so you can follow along at your own pace.
Code: https://github.com/GoCelesteAI/learn-lua-in-neovim
What You'll Learn:
- {key = value} constructor — creating a dictionary table
- Dot notation — t.name for simple string keys
- Bracket notation — t["key"] for any key type
- Adding keys — t.newkey = value
- Updating keys — t.key = newvalue
- Deleting keys — t.key = nil
- Neovim editing: F" (find quote backward), ci" (change inside quotes), dd (delete line)
Timestamps:
0:00 Intro
0:12 Preview — What You'll Learn
0:44 Coding — Person Table
2:31 First Run — Name, Age, City
2:58 Modify Keys — Add, Update, Delete
4:38 Second Run — Email, Updated Age, Nil
5:01 App Config Table
6:51 Final Run — All Sections
8:39 Code Review
9:01 Recap
9:33 Next Episode
Key Takeaways:
1. Tables as dictionaries store key-value pairs
2. Dot notation is clean shorthand for string keys
3. Bracket notation handles any key — strings, variables, hyphenated names
4. Assign a value to add or update; assign nil to delete
This is Episode 19 of the Learn Lua in Neovim series. New episodes cover iteration, nested tables, references, and more — all
coded inside Neovim.
Taught by CelesteAI. Like & subscribe for more tutorials!
#lua #neovim #programming #tutorial #beginners #learnlua #luaprogramming #neovimtutorial #luadictionary #luakeyvalue #coding
Tags:
lua, lua tutorial, learn lua, lua tables as dictionaries, lua key value, lua dictionary, lua dot notation, lua bracket
notation, lua table constructor, lua add key, lua delete key, lua nil, lua for beginners, neovim lua, neovim tutorial, learn
lua in neovim, lua episode 19, programming tutorial, coding tutorial, beginner programming, lua 2026, neovim 2026, screenkey,
code along, lua basics, lua data structures
Tags
lualua tutoriallearn lualua tables as dictionarieslua key valuelua dictionarylua dot notationlua bracket notationlua table constructorlua add keylua delete keylua nillua for beginnersneovim luaneovim tutorial