summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/core/lualine
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/core/lualine')
-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,