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

Function createTopLevelItems

internal/compose/completion.go:158–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156}
157
158func createTopLevelItems() []protocol.CompletionItem {
159 items := []protocol.CompletionItem{}
160 for attributeName, schema := range schemaProperties() {
161 item := protocol.CompletionItem{Label: attributeName}
162 if schema.Description != "" {
163 item.Documentation = schema.Description
164 }
165 items = append(items, item)
166 }
167 slices.SortFunc(items, func(a, b protocol.CompletionItem) int {
168 return strings.Compare(a.Label, b.Label)
169 })
170 return items
171}
172
173func calculateTopLevelNodeOffset(file *ast.File) int {
174 if len(file.Docs) == 1 {

Callers 1

CompletionFunction · 0.85

Calls 1

schemaPropertiesFunction · 0.85

Tested by

no test coverage detected