MCPcopy Create free account
hub / github.com/docker/docker-language-server / processItems

Function processItems

internal/compose/completion.go:373–386  ·  view source on GitHub ↗
(items []protocol.CompletionItem, arrayPrefix bool)

Source from the content-addressed store, hash-verified

371}
372
373func processItems(items []protocol.CompletionItem, arrayPrefix bool) *protocol.CompletionList {
374 items = sortItems(items)
375 if arrayPrefix {
376 for i := range items {
377 if edit, ok := items[i].TextEdit.(protocol.TextEdit); ok {
378 items[i].TextEdit = protocol.TextEdit{
379 NewText: fmt.Sprintf("%v%v", "- ", edit.NewText),
380 Range: edit.Range,
381 }
382 }
383 }
384 }
385 return &protocol.CompletionList{Items: items}
386}
387
388func createChoiceSnippetText(itemTexts []completionItemText) string {
389 sb := strings.Builder{}

Callers 1

CompletionFunction · 0.85

Calls 1

sortItemsFunction · 0.85

Tested by

no test coverage detected