Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completion is very slow when enabling call snippets #543

Closed
folke opened this issue May 20, 2021 · 6 comments
Closed

completion is very slow when enabling call snippets #543

folke opened this issue May 20, 2021 · 6 comments
Labels
bug Something isn't working performance Related to the performance of the langauge server

Comments

@folke
Copy link
Contributor

folke commented May 20, 2021

Describe the bug
I generated an EmmyLua Annotations library for the neovim lua API.

When I enable call snippets Lua.completion.callSnippet = "Both", completions become very slow (about 15 seconds to complete vim.api. on my laptop. (fyi, it returns about 300 functions)

When disabling the setting, the completion returns instantly.

Environment (please complete the following information):

  • OS: macos latest version
  • Client: neovim 0.5

If there's any additional information I can give you, let me know!

@sumneko sumneko added bug Something isn't working performance Related to the performance of the langauge server labels May 21, 2021
@oblitum

This comment has been minimized.

@oblitum
Copy link

oblitum commented Jun 6, 2021

ugh, my problem doesn't seem related with callSnippet in special, just that the language server becomes horribly slow on a 1.5k LoC file (my monolithic init.lua). (fixed)

@oblitum
Copy link

oblitum commented Jun 8, 2021

Okay, having fixed my former problem which was unrelated, I can now confirm this issue on my side as well, it happens for either callSnippet = "Both" or callSnippet = "Replace" (this one actually nicer as it removes duplicates).

@oblitum
Copy link

oblitum commented Jun 21, 2021

Confirmed solved (it's working really nice with coc.nvim). Can be a new default for lua-dev.nvim :)

@oblitum
Copy link

oblitum commented Jun 21, 2021

I suggest "Replace" is better default than "Both"?

@folke
Copy link
Contributor Author

folke commented Jun 21, 2021

@sumneko that's awesome, thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance Related to the performance of the langauge server
Projects
None yet
Development

No branches or pull requests

3 participants