Skip to content

Commit f18f7d6

Browse files
authored
Format progress as percentage (#55)
* Format progress as percentage * Move parentheses in string.format
1 parent 7c376c3 commit f18f7d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lsp-status/statusline.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ local function get_lsp_statusline(bufnr)
8181
contents = msg.title
8282
if msg.message then contents = contents .. ' ' .. msg.message end
8383

84-
if msg.percentage then contents = contents .. ' (' .. msg.percentage .. ')' end
84+
if msg.percentage then contents = contents .. string.format(" (%.0f%%)", msg.percentage) end
8585

8686
if msg.spinner then
8787
contents = config.spinner_frames[(msg.spinner % #config.spinner_frames) + 1] .. ' ' ..

0 commit comments

Comments
 (0)