Only complete arguments for snippets #1263
Merged
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.
This prevents the completion provider from providing arguments for functions/macros when an editor does not enable snippets. With snippet support, arguments are useful because they can be tabbed between, but for an editor which does not implement snippets, the generated arguments are mostly a hassle: you have to move backwards to replace the arguments. This style of completion is in line with other language server implementations I've used:
rust-analyzer
,clangd
, andelixir_ls
, although the Swiftsourcekit-lsp
does something similar to the current behavior.IMO this is a better default behavior and it plays well with signature help (helix-editor/helix#1755), but given that it has been the default behavior for so long, maybe this should be configurable and disabled by default?
Fixes #772.
An asciicast of the change: https://asciinema.org/a/485630. The first edit uses this branch and the second uses erlang_ls 0.23.1.
What do you think?