From 1bea8129530ed6263491e174eff1ab3e23e89139 Mon Sep 17 00:00:00 2001 From: Tiago Inaba <122808226+tiagoinaba@users.noreply.github.com> Date: Wed, 20 Aug 2025 15:09:16 -0300 Subject: [PATCH] fix(lsp): update window title when cycling through signatures #35407 (cherry picked from commit 848c7a7894709a5bf73cd09d5612c35426994c0e) --- runtime/lua/vim/lsp/buf.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index 52d4e8c2f9..ae83a516e8 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -352,6 +352,7 @@ function M.signature_help(config) config = config and vim.deepcopy(config) or {} config.focus_id = method + local user_title = config.title lsp.buf_request_all(0, method, client_positional_params(), function(results, ctx) if api.nvim_get_current_buf() ~= ctx.bufnr then @@ -391,7 +392,7 @@ function M.signature_help(config) local sfx = total > 1 and string.format(' (%d/%d)%s', idx, total, can_cycle and ' ( to cycle)' or '') or '' - config.title = config.title or string.format('Signature Help: %s%s', client.name, sfx) + config.title = user_title or string.format('Signature Help: %s%s', client.name, sfx) -- If no border is set, render title inside the window. if not (config.border or vim.o.winborder ~= '') then table.insert(lines, 1, '# ' .. config.title)