Changed the configuration for sumneko_lua to the recommended configuration by nvim-lspconfig #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.