diff options
| author | Fabian Preuร <[email protected]> | 2021-10-22 13:03:48 +0200 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-22 14:33:48 +0330 | 
| commit | 20e5e507973362016381538aab3091fc0f63ef03 (patch) | |
| tree | 71b2b9015f243df69a20eb05a89dfa24a20cc287 /lua/lvim/core | |
| parent | 4fd27802b0a91a76f6609b1a2cde71eee1bd261a (diff) | |
fix(lualine): use tabstop in spaces component when sensible (#1807)
Diffstat (limited to 'lua/lvim/core')
| -rw-r--r-- | lua/lvim/core/lualine/components.lua | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/lua/lvim/core/lualine/components.lua b/lua/lvim/core/lualine/components.lua index b10fdad9..9366df56 100644 --- a/lua/lvim/core/lualine/components.lua +++ b/lua/lvim/core/lualine/components.lua @@ -122,11 +122,14 @@ return {    progress = { "progress", cond = conditions.hide_in_width, color = {} },    spaces = {      function() -      local label = "Spaces: "        if not vim.api.nvim_buf_get_option(0, "expandtab") then -        label = "Tab size: " +        return "Tab size: " .. vim.api.nvim_buf_get_option(0, "tabstop") .. " "        end -      return label .. vim.api.nvim_buf_get_option(0, "shiftwidth") .. " " +      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 .. " "      end,      cond = conditions.hide_in_width,      color = {}, | 
