diff --git a/.config/nvim/lua/my/functions.lua b/.config/nvim/lua/my/functions.lua index 5125dcb..6056637 100644 --- a/.config/nvim/lua/my/functions.lua +++ b/.config/nvim/lua/my/functions.lua @@ -140,11 +140,24 @@ function M.lsp_status() end function M.lsp_sig_status() + if not vim.lsp.buf.server_ready() then + return "" + end + local width = vim.o.columns / 3 + if width < 40 then + return "" + end if width > 50 then width = width * 1.5 end - return require('lsp_signature').status_line(width).label + + local label = require('lsp_signature').status_line().label + if label:len() > width then + label = label:sub(1, width) .. '…' + end + + return label end function M.not_firenvim()