Skip to content

Conversation

@Jint-lzxy
Copy link
Collaborator

  • on_attach is deprecated;
  • Now lsp_signature won't adjust its position relative to the completion popup to avoid problematic functions (cmp.visible) being called.

* `on_attach` is deprecated;
* Now lsp-signature won't adjust its position relative to the completion popup
  to avoid problematic functions (cmp.visible) being called.
@Jint-lzxy Jint-lzxy requested review from ayamir and charliie-dev July 5, 2023 08:40
Copy link
Collaborator

@charliie-dev charliie-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@charliie-dev charliie-dev merged commit be6f6f7 into main Jul 6, 2023
@charliie-dev charliie-dev deleted the workaround/input-lag branch July 6, 2023 01:51
singlemancombat pushed a commit to singlemancombat/nvim-config that referenced this pull request Jul 6, 2023
@YuCao16
Copy link
Contributor

YuCao16 commented Jul 22, 2023

Does this fix work for you? Because I'm still experiencing input delay on my end. If I disable lsp_signature, input delay disappears.

@Jint-lzxy
Copy link
Collaborator Author

@YuCao16 This PR only reduces calls to cmp.visible(), but as a matter of fact, u can completely eliminate related calls (since we disabled check_completion_visible) via this patch:

diff --git a/lua/lsp_signature/helper.lua b/lua/lsp_signature/helper.lua
index 8d09a22..c3e32d6 100644
--- a/lua/lsp_signature/helper.lua
+++ b/lua/lsp_signature/helper.lua
@@ -697,7 +697,7 @@ end
 helper.completion_visible = function()
   local hascmp, cmp = pcall(require, 'cmp')
   if hascmp then
-    return cmp.visible()
+    return true
   end

   return fn.pumvisible() ~= 0

The issue upstream is not every call to cmp.visible() gets checked.

@Jint-lzxy
Copy link
Collaborator Author

Will #890 fix that?

@YuCao16
Copy link
Contributor

YuCao16 commented Jul 23, 2023

Will #890 fix that?

Yes, it works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants