[neovim] Set lualine indicator about tabs/spaces set for the current buffer

This commit is contained in:
Daniel Carrillo 2022-10-02 12:04:24 +02:00
parent 728fbdc355
commit 847d1f9d71
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
1 changed files with 9 additions and 2 deletions

View File

@ -13,7 +13,7 @@ local diagnostics = {
sections = { "error", "warn" },
symbols = { error = "", warn = "" },
colored = false,
always_visible = true,
always_visible = false,
}
local diff = {
@ -34,7 +34,14 @@ local location = {
}
local spaces = function()
return "spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
local expandtab = vim.api.nvim_buf_get_option(0, "expandtab")
local title = "spaces: "
if not expandtab then
title = "tab: "
end
return title .. vim.api.nvim_buf_get_option(0, "shiftwidth")
end
local gitblame_status_ok, gitblame = pcall(require, "gitblame")