summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <listout@listout.xyz>2025-06-17 22:49:01 +0530
committerBrahmajit Das <listout@listout.xyz>2025-06-17 22:49:01 +0530
commit1141b6066a9d2f7bbf9e93786f5df39f4d153683 (patch)
treedc945f3b2f6cc8a6addedb5cef52e1e0a2deb006
parentdf943534428122b48cc21bc668a005c44d942789 (diff)
lua: plugins: lualine: show relative filepathHEADmaster
And base config on upstream docs Signed-off-by: Brahmajit Das <listout@listout.xyz>
-rw-r--r--lua/plugins/lualine.lua38
1 files changed, 36 insertions, 2 deletions
diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua
index e3cf2b7..85c0155 100644
--- a/lua/plugins/lualine.lua
+++ b/lua/plugins/lualine.lua
@@ -15,17 +15,51 @@ return {
},
ignore_focus = {},
always_divide_middle = true,
+ always_show_tabline = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
+ refresh_time = 16, -- ~60fps
+ events = {
+ 'WinEnter',
+ 'BufEnter',
+ 'BufWritePost',
+ 'SessionLoadPost',
+ 'FileChangedShellPost',
+ 'VimResized',
+ 'Filetype',
+ 'CursorMoved',
+ 'CursorMovedI',
+ 'ModeChanged',
+ },
}
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
- lualine_c = { 'filename' },
+ lualine_c = {
+ {
+ 'filename',
+ file_status = true, -- Displays file status (readonly status, modified status)
+ newfile_status = false, -- Display new file status (new file means no write after created)
+ path = 1, -- 0: Just the filename
+ -- 1: Relative path
+ -- 2: Absolute path
+ -- 3: Absolute path, with tilde as the home directory
+ -- 4: Filename and parent dir, with tilde as the home directory
+
+ shorting_target = 40, -- Shortens path to leave 40 spaces in the window
+ -- for other components. (terrible name, any suggestions?)
+ symbols = {
+ modified = '[+]', -- Text to show when the file is modified.
+ readonly = '[-]', -- Text to show when the file is non-modifiable or readonly.
+ unnamed = '[No Name]', -- Text to show for unnamed buffers.
+ newfile = '[New]', -- Text to show for newly created file before first write
+ }
+ }
+ },
lualine_x = { 'encoding', 'fileformat', 'filetype' },
lualine_y = { 'progress' },
lualine_z = { 'location' }
@@ -41,7 +75,7 @@ return {
tabline = {},
winbar = {},
inactive_winbar = {},
- extensions = {},
+ extensions = {}
}
},
}