Skip to content

Commit

Permalink
feat(lsp): make signature auto_open for snippets configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 1, 2024
1 parent 9aae97f commit 0783e22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/noice/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ function M.defaults()
enabled = true,
trigger = true, -- Automatically show signature help when typing a trigger character from the LSP
luasnip = true, -- Will open signature help when jumping to Luasnip insert nodes
snipppets = true, -- Will open when jumping to placeholders in snippets (Neovim builtin snippets)
throttle = 50, -- Debounce lsp signature help request by 50ms
},
view = nil, -- when nil, use defaults from documentation
Expand Down
2 changes: 2 additions & 0 deletions lua/noice/lsp/signature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ function M.on_attach(buf, client)
buffer = buf,
callback = callback,
})
end
if Config.options.lsp.signature.auto_open.snipppets then
vim.api.nvim_create_autocmd("ModeChanged", {
buffer = buf,
callback = function(ev)
Expand Down

0 comments on commit 0783e22

Please sign in to comment.