nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
6.02k stars 462 forks source link

Usage questions #124

Closed timsofteng closed 3 years ago

timsofteng commented 3 years ago

Hello. Have couple of questions about lualine

  1. Can i put file_name to first a sections instead of mode section? When i try to do it it brokes sections separation. image

  2. How can i enable full path to file?

  3. Can lualine display progress section as currcnt_line/all_lines_number current_position_in_line (e.g. 22/290 5 for cursor position in 22 line and 5 column)

hoob3rt commented 3 years ago
  1. Can i put file_name to first a sections instead of mode section? When i try to do it it brokes sections separation.

Wdym it breaks section separators? It works fine for me.

  1. How can i enable full path to file?
lualine.sections.lualine_a = {{'filename', full_path = true}}
  1. Can lualine display progress section as currcnt_line/all_lines_number current_position_in_line (e.g. 22/290 5 for cursor position in 22 line and 5 column)

No, first of all it's called a location component but that's not the point. You cannot do that atm. You can always do:

local function my_location()
  local data = [[%3l/%-2c]]
  return data
end
lualine.sections.lualine_z = { my_location } 

I thought everything is well documented in the readme.md under options for components section. Lmk if you need any more help or have an idea on how to improve the readme