From 41733343402476852c6e16afea6f9b069b9be83b Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Mon, 31 Jan 2022 23:09:48 +0300 Subject: [PATCH] Update status line --- config/nvim/lua/user/lualine.lua | 42 +++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/config/nvim/lua/user/lualine.lua b/config/nvim/lua/user/lualine.lua index 65a62c6..3423b05 100644 --- a/config/nvim/lua/user/lualine.lua +++ b/config/nvim/lua/user/lualine.lua @@ -1,37 +1,55 @@ local lualine = require("lualine") +-- Section "a" +local mode = { + "mode", +} + +-- Section "b" local branch = { "branch", icons_enabled = true, icon = "", } -local mode = { - "mode", +-- Section "c" +local filename = { + "filename", +} +local fileformat = { + "fileformat", + symbols = { + unix = "", + dos = "", + mac = "", + }, } +-- Section "x" +local location = { + "location", +} + +-- Section "y" +local encoding = { + "encoding", +} local filetype = { "filetype", } -local location = function() - local line, column = unpack(vim.api.nvim_win_get_cursor(0)) - - return "Ln " .. line .. ", Col " .. column -end - lualine.setup({ options = { disabled_filetypes = { "NvimTree" }, - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, + component_separators = "", + section_separators = "", }, sections = { lualine_a = { mode }, lualine_b = { branch }, - lualine_c = {}, + lualine_c = { filename, fileformat }, lualine_x = { location }, - lualine_y = { "encoding", filetype }, + lualine_y = { encoding, filetype }, lualine_z = {}, }, })