diff options
author | Christian Chiarulli <[email protected]> | 2022-09-21 17:58:52 -0400 |
---|---|---|
committer | Christian Chiarulli <[email protected]> | 2022-09-21 17:58:52 -0400 |
commit | 2cfb55ddb628e135a95f669d9f393ed3a2b1d950 (patch) | |
tree | f636c8e3e2a99884088c511e28beabe805c748f6 /lua/lvim/core/lualine/components.lua | |
parent | 4b0a60e23c0554b1dfa14e80f1e19feffd0204a5 (diff) |
feat(lualine): improvements
Diffstat (limited to 'lua/lvim/core/lualine/components.lua')
-rw-r--r-- | lua/lvim/core/lualine/components.lua | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lua/lvim/core/lualine/components.lua b/lua/lvim/core/lualine/components.lua index 0a58e415..5f29d4ef 100644 --- a/lua/lvim/core/lualine/components.lua +++ b/lua/lvim/core/lualine/components.lua @@ -22,10 +22,18 @@ vim.api.nvim_set_hl(0, "SLProgress", { fg = "#ECBE7B", bg = statusline_hl.backgr local location_color = nil local branch = "" +local separator = "│" if lvim.colorscheme == "tokyonight" then location_color = "SLBranchName" branch = "%#SLGitIcon#" .. "" .. "%*" .. "%#SLBranchName#" + + local status_ok, tnc = pcall(require, "tokyonight.colors") + if status_ok then + local tncolors = tnc.setup { transform = true } + vim.api.nvim_set_hl(0, "SLSeparator", { fg = cursorline_hl.background, bg = tncolors.black }) + separator = "%#SLSeparator#" .. "│" .. "%*" + end end return { @@ -124,6 +132,7 @@ return { local unique_client_names = vim.fn.uniq(buf_client_names) return "[" .. table.concat(unique_client_names, ", ") .. "]" end, + separator = separator, color = { gui = "bold" }, cond = conditions.hide_in_width, }, @@ -135,19 +144,14 @@ return { end, color = {}, }, + spaces = { function() - if not vim.api.nvim_buf_get_option(0, "expandtab") then - return "Tab size: " .. vim.api.nvim_buf_get_option(0, "tabstop") .. " " - end - local size = vim.api.nvim_buf_get_option(0, "shiftwidth") - if size == 0 then - size = vim.api.nvim_buf_get_option(0, "tabstop") - end - return "Spaces: " .. size .. " " + local shiftwidth = vim.api.nvim_buf_get_option(0, "shiftwidth") + return "ï ‘ " .. shiftwidth end, - cond = conditions.hide_in_width, - color = {}, + separator = separator, + padding = 1, }, encoding = { "o:encoding", @@ -155,7 +159,7 @@ return { color = {}, cond = conditions.hide_in_width, }, - filetype = { "filetype", cond = conditions.hide_in_width, padding = { left = 1, right = 2 } }, + filetype = { "filetype", cond = nil, padding = { left = 1, right = 1 } }, scrollbar = { function() local current_line = vim.fn.line "." |