From 65bb32b75d67e8f0f629d70a683df883bf901841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 11 May 2022 15:28:49 +0200 Subject: [PATCH] Fix statusline behavior when parts of lsp message are missing --- symlinks/config/nvim/lua/esensar/ui/statusline.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/symlinks/config/nvim/lua/esensar/ui/statusline.lua b/symlinks/config/nvim/lua/esensar/ui/statusline.lua index 4475c60..f97c85d 100644 --- a/symlinks/config/nvim/lua/esensar/ui/statusline.lua +++ b/symlinks/config/nvim/lua/esensar/ui/statusline.lua @@ -169,13 +169,11 @@ local statuslines = { status = status .. " %2*" .. "[" - .. first_lsp_message.name + .. (first_lsp_message.name or "") .. "]" - .. "(" - .. first_lsp_message.percentage - .. "%%)" + .. (first_lsp_message.percentage and "(" .. first_lsp_message.percentage .. "%%)" or "") .. " " - .. first_lsp_message.title + .. (first_lsp_message.title or "") .. "%*" end -- TODO: Add current container if devcontainer is used