mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-03 08:54:04 +00:00
b47aff4c14
This fixes #7523 by enabling completions with placeholders by default. This setting controls whether gopls sends back snippets with placeholders. According to the documentation (https://github.com/golang/tools/blob/master/gopls/doc/settings.md#useplaceholders-bool) this only controls whether "placeholders for function parameters or struct fields" are sent in completion responses. In practice, though, this seems to also control whether any snippets with *any* placeholders are being sent back. Example: for the given Go code err := myFunction() i^ With the cursor being at `^`, this setting controls whether `gopls` sends back statement snippets such as `if err != nil { return ... }` with the `...` being dynamically matched to the return value of the function. So I think this setting controls far more than just function params and struct fields. And since we *do* support placeholders in snippets, I think this provides a better default experience. Release Notes: - Improved default Go experience by enabling snippets-with-placeholders when initializing `gopls`. ([#7523](https://github.com/zed-industries/zed/issues/7523)). |
||
---|---|---|
.. | ||
contents | ||
resources | ||
src | ||
build.rs | ||
Cargo.toml | ||
LICENSE-GPL | ||
RELEASE_CHANNEL |