this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

lsp/server: make "Remove surrounding struct braces" preferred

If both add and remove struct braces code actions are available, it
makes good sense to prefer the "remove..." action. By marking it
preferred, many editors will place it first in menus of actions.

Signed-off-by: Matthew Sackman <matthew@cue.works>
Change-Id: I8b388454aeb462ca068526ce5abd12b387606b34
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1232504
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

+5
+5
internal/lsp/server/codeaction.go
··· 56 56 Title: "Remove surrounding struct braces", 57 57 Kind: protocol.RefactorRewriteConvertFromStruct, 58 58 Edit: convertFromStructEdit, 59 + // Mark it preferred so that if both "Add..." and "Remove..." 60 + // are available, then this "Remove..." action will be 61 + // prioritised by editors. This most likely matches the 62 + // user's needs. 63 + IsPreferred: true, 59 64 }) 60 65 } 61 66