Learn Lua in Neovim: Variables and Types — local, type() & Nil | Episode 2
13views
1likes
07:07
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn how to store and work with data in Lua! In this episode, we cover the local keyword, the four core data types — string, number, boolean, and nil — and
how to inspect any value with type().
Every keystroke is shown on screen with 3-second pauses so you can follow along at your own pace.
What You'll Learn:
- Declaring variables with local
- The string, number, boolean, and nil types
- Checking a value's type with type()
- Why nil means "nothing" in Lua
- Printing variables alongside strings using ..
- How Lua handles uninitialized variables (they're nil!)
Source Code:
https://github.com/GoCelesteAI/learn-lua-in-neovim
Timestamps:
0:00 - Introduction
0:12 - What You'll Learn (Preview)
0:44 - Creating variables.lua
0:54 - String: local name = "Alice"
1:45 - First Run — :!lua %
2:08 - Number: local age = 25
3:00 - Boolean: local is_student = true
3:55 - Nil: local nickname = nil
4:49 - Summary with Concatenation (..)
5:12 - Final Run — All Four Types
5:35 - Recap: Key Takeaways
6:07 - End Screen
Key Takeaways:
1. local x = value — declare a scoped variable
2. Four core types: string, number, boolean, nil
3. type(x) — inspect any value's type at runtime
4. Uninitialized variables are nil by default
5. .. concatenates variables with string output
This is Episode 2 of the Learn Lua in Neovim series. New episodes cover arithmetic, strings, conditionals, and more — all coded inside Neovim.
Taught by CelesteAI. Like & subscribe for more tutorials!
#lua #neovim #programming #tutorial #beginners #learnlua #luaprogramming #neovimtutorial #variables #datatypes #coding