Get The Buffer Number Of A Buffer In A Neovim Window With Lua
Getting The Buffer Number
Use this to get the buffer number of the buffer in a specific window:
lua
Where [TODO: Code shorthand span ] is the number of the window you want to get the buffer number for. It can be set to zero to get the buffer number of the current window.
To see the value on the command line, use:
lua
The Current Window Number
You can find the window number of the current window with:
lua
Which is used like this on the command line
lua
~ fin ~