Skip to content

x/tools/gopls: add .if and .not snippets for bool types #47545

Open
@hhhapz

Description

@hhhapz

Is your feature request related to a problem? Please describe. The
introduction of postfix snippets has brought very convenient functionality to
gopls, especially when working outside of Goland. I wanted to contribute more
ideas for postfix completions inspired from what's already available from their
editors. In particular, I wanted to propose having a if! and not! prompts,
which do this (respectively):

(complex bool expression).if|
if (complex bool expression) {
	|
}

(expr).not|
!(expr)

Describe the solution you'd like
Implementing these in completion/postfix_snippets.go.

Describe alternatives you've considered
As a vim developper personally, I use
snippetsEmu. Other
potential alternatives are available in VSCode and Goland.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions