From 9944eb877695f9fa8607d5c59864131190dba275 Mon Sep 17 00:00:00 2001 From: Eti Date: Sun, 25 Jul 2021 18:36:53 +0200 Subject: Show correct indentation settings in galaxyline (#1093) Display "Tab size: " instead of "Spaces: " if indenting with tabs. --- lua/core/galaxyline.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lua/core') diff --git a/lua/core/galaxyline.lua b/lua/core/galaxyline.lua index 8ca6f5c7..abc7c369 100644 --- a/lua/core/galaxyline.lua +++ b/lua/core/galaxyline.lua @@ -266,7 +266,11 @@ table.insert(gls.right, { table.insert(gls.right, { Tabstop = { provider = function() - return "Spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth") .. " " + local label = "Spaces: " + if not vim.api.nvim_buf_get_option(0, "expandtab") then + label = "Tab size: " + end + return label .. vim.api.nvim_buf_get_option(0, "shiftwidth") .. " " end, condition = condition.hide_in_width, separator = " ", -- cgit v1.2.3