Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 2c5dda6

Browse files
authored
Merge pull request #378 from tomcur/handle-filetype
Handle filetype in floating signature help window
2 parents 295b691 + df75a13 commit 2c5dda6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/completion/signature_help.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ M.autoOpenSignatureHelp = function()
2828
if triggered then
2929
-- overwrite signature help here to disable "no signature help" message
3030
local params = vim.lsp.util.make_position_params()
31+
local filetype = vim.api.nvim_buf_get_option(0, 'filetype')
3132
vim.lsp.buf_request(0, 'textDocument/signatureHelp', params, function(err, method, result, client_id)
3233
local client = vim.lsp.get_client_by_id(client_id)
3334
local handler = client and client.handlers['textDocument/signatureHelp']
@@ -38,7 +39,7 @@ M.autoOpenSignatureHelp = function()
3839
if not (result and result.signatures and result.signatures[1]) then
3940
return
4041
end
41-
local lines = vim.lsp.util.convert_signature_help_to_markdown_lines(result)
42+
local lines = vim.lsp.util.convert_signature_help_to_markdown_lines(result, filetype)
4243
if vim.tbl_isempty(lines) then
4344
return
4445
end

0 commit comments

Comments
 (0)