summaryrefslogtreecommitdiff
path: root/lua/core/galaxyline.lua
diff options
context:
space:
mode:
authorEti <[email protected]>2021-07-25 18:36:53 +0200
committerGitHub <[email protected]>2021-07-25 12:36:53 -0400
commit9944eb877695f9fa8607d5c59864131190dba275 (patch)
tree7033e5cfbbd3dc68d3d1698433f04ea4a0a79b13 /lua/core/galaxyline.lua
parent739784e43cdec5a69585b9845fccd27981819ade (diff)
Show correct indentation settings in galaxyline (#1093)
Display "Tab size: " instead of "Spaces: " if indenting with tabs.
Diffstat (limited to 'lua/core/galaxyline.lua')
-rw-r--r--lua/core/galaxyline.lua6
1 files changed, 5 insertions, 1 deletions
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 = " ",