add: update config

This commit is contained in:
asep.komarudin 2024-04-18 07:17:54 +07:00
parent c651a8ca42
commit a81806cab8
15 changed files with 363 additions and 407 deletions

View file

@ -8,6 +8,14 @@ return {
end
local icons = require("user.icons")
local getLeftSubstring = function(word, length)
if #word > length then
return string.sub(word, 1, length) .. "..."
else
return word
end
end
-- start for lsp
local list_registered_providers_names = function(filetype)
local s = require("null-ls.sources")
@ -131,7 +139,7 @@ return {
local get_branch = function()
if vim.b.gitsigns_head ~= nil then
return icons.git.Branch2 .. " " .. vim.b.gitsigns_head
return icons.git.Branch2 .. " " .. getLeftSubstring(vim.b.gitsigns_head, 6)
else
return icons.git.Branch2 .. vim.fn.fnamemodify("", ":t")
end