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

Changed the configuration for sumneko_lua to the recommended configuration by nvim-lspconfig #44

Closed
wants to merge 1 commit into from

Conversation

hankertrix
Copy link

@hankertrix hankertrix commented Feb 1, 2023

My rationale for this is that most Neovim users (I believe it is the case for you as well) would only use the Lua language server for Neovim configuration and plugin development instead of doing regular programming and development using Lua. The recommended settings by nvim-lspconfig can be found here.

However, these settings will significantly increase the time it takes for the language server to handle initial requests upon starting as well as the time to first diagnostics. Completion results will also include a workspace indexing progress message until the language server has finished indexing. This disclaimer is also written on the nvim-lspconfig page.

An alternative to setting up the language server this way would be to install the folke/neodev.nvim plugin to facilitate configuration and plugin development on Neovim. However, in my experience, it makes the language server much slower. The autocompletion suggestions and diagnostics have a noticeable delay, sometimes up to a few seconds, instead of being instant. And this is the case on every autocompletion suggestion and diagnostic message, which would be irritating to deal with. But the upside is that the language server can service initial requests instantly and doesn’t need to take time to initialise and index the workspace.

Feel free to reject this pull request if the trade-offs aren’t worth it for you.

@hankertrix
Copy link
Author

I suggest using #35 instead.

@hankertrix hankertrix closed this Feb 8, 2023
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.

1 participant