(schema *jsonschema.Schema, params *protocol.CompletionParams, wordPrefixLength protocol.UInteger)
| 275 | } |
| 276 | |
| 277 | func createEnumItems(schema *jsonschema.Schema, params *protocol.CompletionParams, wordPrefixLength protocol.UInteger) []protocol.CompletionItem { |
| 278 | items := []protocol.CompletionItem{} |
| 279 | for _, value := range schema.Enum.Values { |
| 280 | enumValue := value.(string) |
| 281 | item := protocol.CompletionItem{ |
| 282 | Label: enumValue, |
| 283 | Documentation: schema.Description, |
| 284 | Detail: extractDetail(schema), |
| 285 | TextEdit: protocol.TextEdit{ |
| 286 | NewText: enumValue, |
| 287 | Range: protocol.Range{ |
| 288 | Start: protocol.Position{ |
| 289 | Line: params.Position.Line, |
| 290 | Character: params.Position.Character - wordPrefixLength, |
| 291 | }, |
| 292 | End: params.Position, |
| 293 | }, |
| 294 | }, |
| 295 | } |
| 296 | items = append(items, item) |
| 297 | } |
| 298 | return items |
| 299 | } |
| 300 | |
| 301 | func createSchemaItems(params *protocol.CompletionParams, nodeProps any, lines []string, lspLine int, whitespacePrefixedArrayAttribute bool, wordPrefixLength protocol.UInteger, file *ast.File, manager *document.Manager, documentPath document.DocumentPath, path []*ast.MappingValueNode) []protocol.CompletionItem { |
| 302 | items := []protocol.CompletionItem{} |
no test coverage detected