ZIm/crates/zed/src
Thorsten Ball b47aff4c14
go: enable completions with placeholders by default (#7780)
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)).
2024-02-14 18:29:42 +01:00
..
languages go: enable completions with placeholders by default (#7780) 2024-02-14 18:29:42 +01:00
app_menus.rs Add an extensions installation view (#7689) 2024-02-13 14:09:02 -05:00
languages.rs Add Astro Support (#6896) 2024-02-12 10:10:40 -08:00
main.rs revert single channel click (#7738) 2024-02-13 12:53:49 -07:00
only_instance.rs gpui: Add Global marker trait (#7095) 2024-01-30 14:08:20 -05:00
open_listener.rs Use try_from_bytes in handle_file_urls (#7652) 2024-02-10 23:05:52 -07:00
zed.rs Add an extensions installation view (#7689) 2024-02-13 14:09:02 -05:00