summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/core/lualine/components.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-11-08 23:13:05 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-11-08 23:13:05 +0100
commitc9e2adbbc8fd7a5398c8c66d21f0e02dc7b60203 (patch)
tree274263ba15e0197180af8bb681e22c4780d5de05 /.config/nvim/lua/core/lualine/components.lua
parente4ea22e223bbd6b4091610c6fa093862cbd32f75 (diff)
Add new lunarvin updates
Diffstat (limited to '.config/nvim/lua/core/lualine/components.lua')
-rw-r--r--.config/nvim/lua/core/lualine/components.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/.config/nvim/lua/core/lualine/components.lua b/.config/nvim/lua/core/lualine/components.lua
index 9333a17..6ef1cff 100644
--- a/.config/nvim/lua/core/lualine/components.lua
+++ b/.config/nvim/lua/core/lualine/components.lua
@@ -117,12 +117,12 @@ return {
-- add formatter
local formatters = require "lsp.null-ls.formatters"
- local supported_formatters = formatters.list_supported_names(buf_ft)
+ local supported_formatters = formatters.list_registered_providers(buf_ft)
vim.list_extend(buf_client_names, supported_formatters)
-- add linter
local linters = require "lsp.null-ls.linters"
- local supported_linters = linters.list_supported_names(buf_ft)
+ local supported_linters = linters.list_registered_providers(buf_ft)
vim.list_extend(buf_client_names, supported_linters)
return table.concat(buf_client_names, ", ")
@@ -135,11 +135,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,
color = {},
cond = conditions.hide_in_width,