MunifTanjim / nougat.nvim

🍫 Hyperextensible Statusline / Tabline / Winbar for Neovim 🚀
MIT License
197 stars 3 forks source link

quest: get the number of lines of a file? #72

Closed divramod closed 8 months ago

divramod commented 9 months ago

i saw this snippet in the examples:

stl:add_item(Item({
  hl = {fg = color.bg, bg = color.fg0},
  prefix = ' ',
  suffix = ' ',
  content = core.group({core.code('l'), ':', core.code('c')})
}))

is it somehow possible to get the number of lines a file has too with core.code?

i could not find the documentation for it.

MunifTanjim commented 9 months ago

It's L. This is documented in :help 'statusline'.