From c9e2adbbc8fd7a5398c8c66d21f0e02dc7b60203 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 8 Nov 2021 23:13:05 +0100 Subject: Add new lunarvin updates --- .config/nvim/lua/core/lualine/components.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to '.config/nvim/lua/core/lualine/components.lua') 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, -- cgit v1.2.3-70-g09d2