mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-23 17:28:50 +02:00
add: default loading from fidget to lspprogress
This commit is contained in:
parent
53b42062e3
commit
ee5301ba54
6 changed files with 93 additions and 12 deletions
|
@ -1,3 +1,23 @@
|
|||
local function ambilKataDariKiri(kalimat, jumlahKata)
|
||||
local hasil = ""
|
||||
local posisiAwal = 1
|
||||
local kataKe = 0
|
||||
|
||||
while kataKe < jumlahKata do
|
||||
local posisiSpasi = string.find(kalimat, " ", posisiAwal)
|
||||
if posisiSpasi then
|
||||
hasil = hasil .. string.sub(kalimat, posisiAwal, posisiSpasi - 1) .. " "
|
||||
posisiAwal = posisiSpasi + 1
|
||||
else
|
||||
hasil = hasil .. string.sub(kalimat, posisiAwal)
|
||||
break
|
||||
end
|
||||
kataKe = kataKe + 1
|
||||
end
|
||||
|
||||
return hasil
|
||||
end
|
||||
|
||||
local fidget = true
|
||||
local lualine = false
|
||||
local data_exists, custom_ui = pcall(require, "core.config")
|
||||
|
@ -45,13 +65,13 @@ return {
|
|||
require("lsp-progress").setup({
|
||||
client_format = function(client_name, spinner, series_messages)
|
||||
return #series_messages > 0
|
||||
and (spinner .. " " .. string.sub(table.concat(series_messages, ", "), 1, 25) .. " ...")
|
||||
and (spinner .. " " .. ambilKataDariKiri(table.concat(series_messages, ", "), 4) .. "...")
|
||||
or nil
|
||||
end,
|
||||
format = function(client_messages)
|
||||
local sign = ""
|
||||
return #client_messages > 0
|
||||
and (sign .. " " .. string.sub(table.concat(client_messages, " "), 1, 25) .. " ...")
|
||||
and (sign .. " " .. ambilKataDariKiri(table.concat(client_messages, " "), 4) .. "...")
|
||||
or sign
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue