Open PMassicotte opened 11 months ago
Looks like a bug to me. Do you have a full config. More specifically the lspconfig and language server setup so I can reproduce this bug?
Is it ok with that information?
I'm getting the same issue using the base installation instructions for lazy and with the default configs for everything. Every other keystroke hides/shows the floating window - essentially toggling on and off on every keypress.
{
"ray-x/lsp_signature.nvim",
event = "VeryLazy",
opts = {},
config = function(_, opts) require'lsp_signature'.setup(opts) end
},
There are too many plugins being used in your setup this makes it hard to check which may conflict with the plugin. You can refer to https://github.com/ray-x/lsp_signature.nvim/blob/master/tests/init_pack.lua on a reference of a minium vimrc.
Thank you @ray-x, I will try to provide a minimal example. Meanwhile, is it possible to disable the plugin for specific filetypes?
I'm having this same problem. I noticed it's popping on and off with R scripts, but seems to be working properly with lua code. I'm using nvchad with a few extra plugins installed.
I've observed an issue with the HandleFunc()
function in Golang's gorilla/mux library
where it seems to be glitching, causing disruptions with lsp_signature.toggle_float_win()
functionality. Interestingly, this problem doesn't occur with PHP and Lua.
Upon testing without require("lsp_signature").setup()
, I noticed that lsp_signature.toggle_float_win()
works fine. Other function signatures, such as Fatal()
, Encode()
, etc., also seem unaffected. I'm curious if this could be related to overloaded signatures? Golang does not have overload
I have both lspconfig
and nvim-cmp
configured, but I'm unsure about what might have gone wrong. Notably, both HandleFunc()
and log.PrintLn()
exhibit the glitch issue, while log.Fatal() does not.
I've attached the HandleFunc()
and log.Fatal()
lsp_signature.nvim logs for reference.
I noticed when the symtoms of signature float off is when it ends with "trigger from cursor hold, no need to update floating window". Otherwise, the float window kept floating without any issue.
lsp_signature.log
|1: incorrect signature response? |2: {
cfgActiveSignature = 0,
signatures = { {
documentation = {
kind = "markdown",
value = "HandleFunc registers a new route with a matcher for the URL path. See Route.Path() and Route.HandlerFunc()."
},
label = "HandleFunc(path string, f func(http.ResponseWriter, *http.Request)) *mux.Route",
parameters = { {
label = "path string"
}, {
label = "f func(http.ResponseWriter, *http.Request)"
} }
} }
}
|3: {
border = "rounded",
line_to_cursor = "\tr.HandleFunc",
trigger_from_cursor_hold = true,
triggered_chars = { "(", "," }
}
|1: sig Par |2: 0 |3: {
label = "path string"
}
|4: label: |5: HandleFunc(path string, f func(http.ResponseWriter, *http.Request)) *mux.Route
|1: match next pos: |2: path string |3: 12 |4: 22
|1: trigger from cursor hold, no need to update floating window
Pushed a fix for gopls. It related to HandleFunc
@myself379 pointed out.
Quick aside question, is it possible to disable this plugin for some problematic filetype (like R in the original question)?
Just noticed that b963a39 fixed the issue with R language. Thank you very much!
I have this very simple config:
When I type, the signature windows keep popping on and off on every keystroke. Is this a bug, or can I modify something to change that behavior?