For a plugin I’m writing, I need to get the text equivalent of a <tab>. However, tabs in Neovim has configured by a bunch of different options. I want to get validation from someone else if my logic here is correct or if there is a better way to do this.
local function tab()
if vim.bo.expandtab then
return string.rep(" ", vim.fn.shiftwidth())
return " " -- tab character