-
After Lazy setup, where to keep & how to trigger it to run |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You can put this really anywhere where you want to build a component and run it. A good test would be to just put it in your That require just loads that module and run the code inside of it. If you have a function somewhere else like attached to a key binding or something where you want to build a component you can do it there or organize it somewhere else in your config and then |
Beta Was this translation helpful? Give feedback.
-
One thing to note is that gist is missing a couple imports, so just make sure to add this at the top of the file: local n = require "nui-components"
local spinner_formats = require "nui-components.utils.spinner-formats" |
Beta Was this translation helpful? Give feedback.
-
@mehalter thanks for the detailed explanation! I have just updated the gist content :) |
Beta Was this translation helpful? Give feedback.
You can put this really anywhere where you want to build a component and run it. A good test would be to just put it in your
~/.config/nvim/lua
folder so say you put it at~/.config/nvim/lua/nui_components_intro.lua
then when you run neovim you would simply run:lua require("nui_components_intro")
and it would execute the code.That require just loads that module and run the code inside of it. If you have a function somewhere else like attached to a key binding or something where you want to build a component you can do it there or organize it somewhere else in your config and then
require
it