ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.05k stars 57 forks source link

Make floating window pop up only when triggered by a keymapping #316

Closed netrolite closed 6 months ago

netrolite commented 6 months ago

Hi, I'm wondering if it's possible to make the floating window show up only after it's been triggered by a keymapping instead of automatically whenever I'm inside the parenthesis of a function call. I couldn't find this option in the docs...

Here's my current config:

plugins/lsp_signature.lua

local map_key = require("utils.map_key")

return {
    "ray-x/lsp_signature.nvim",
    event = "VeryLazy",
    config = function()
        require("lsp_signature").setup({
            hint_enable = false,
            always_trigger = false,
            zindex = 50,
        })

        map_key("<C-y>", function()
            require("lsp_signature").toggle_float_win()
        end)
    end,
}
ray-x commented 6 months ago

try this:

 toggle_key = nil, -- toggle signature on and off in insert mode,  e.g. toggle_key = '<M-x>'
netrolite commented 6 months ago

this didn't work, but don't worry, i forked this repo, changed the code a bit and now it works the way i wanted it to.