π Get Started
Welcome to ascii-ui.nvim β a Lua framework for building reactive ASCII user interfaces directly inside Neovim buffers.
These docs are still a work in progress, but you can already start creating components today π‘
π Requirementsβ
- Neovim 0.11+
π¦ Installationβ
Install ascii-ui.nvim with your favorite plugin manager.
Hereβs an example using lazy.nvim:
return {
"rcasia/ascii-ui.nvim",
opts = {},
}
π§± Create Your First Neovim Appβ
Letβs create a simple Neovim app that renders a message inside a buffer.
-
Open Neovim and create a new file for your app:
nvim hello_world.lua
-
Add the following code:
-- hello_world.lua
local ui = require("ascii-ui")
-- Define your root component
local HelloWorld = ui.createComponent("HelloWorld", function()
return ui.components.Paragraph({ content = "Hello, ascii-ui! π" })
end)
-- Mount the app into a new buffer
ui.mount(HelloWorld) -
Save the file (:w), exit Neovim (:q), and run the script:
nvim -c "luafile hello_world.lua"
Youβll see βHello, ascii-ui! πβ rendered directly inside Neovim β¨
This is your first ascii-ui Neovim app β from here, you can add components, manage state, and build interactive UIs directly inside Neovim π
π Next Stepsβ
Now that youβve built your first app, explore the rest of the framework:
- π Hooks β manage state, side effects, and more