nvim: rework lsp_sig_status()
This commit is contained in:
parent
19e76a16d8
commit
48af73653f
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user