@@ -2257,6 +2257,164 @@ services:
2257
2257
configs:
2258
2258
- t
2259
2259
configs:
2260
+ test2:
2261
+ file: ./httpd.conf` ,
2262
+ line : 5 ,
2263
+ character : 9 ,
2264
+ list : & protocol.CompletionList {
2265
+ Items : []protocol.CompletionItem {
2266
+ {
2267
+ Label : "gid" ,
2268
+ Detail : types .CreateStringPointer ("string" ),
2269
+ TextEdit : textEdit ("gid: " , 5 , 9 , 1 ),
2270
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2271
+ },
2272
+ {
2273
+ Label : "mode" ,
2274
+ Detail : types .CreateStringPointer ("number or string" ),
2275
+ TextEdit : textEdit ("mode: " , 5 , 9 , 1 ),
2276
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2277
+ },
2278
+ {
2279
+ Label : "source" ,
2280
+ Detail : types .CreateStringPointer ("string" ),
2281
+ TextEdit : textEdit ("source: " , 5 , 9 , 1 ),
2282
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2283
+ },
2284
+ {
2285
+ Label : "target" ,
2286
+ Detail : types .CreateStringPointer ("string" ),
2287
+ TextEdit : textEdit ("target: " , 5 , 9 , 1 ),
2288
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2289
+ },
2290
+ {
2291
+ Label : "test2" ,
2292
+ TextEdit : textEdit ("test2" , 5 , 9 , 1 ),
2293
+ },
2294
+ {
2295
+ Label : "uid" ,
2296
+ Detail : types .CreateStringPointer ("string" ),
2297
+ TextEdit : textEdit ("uid: " , 5 , 9 , 1 ),
2298
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2299
+ },
2300
+ },
2301
+ },
2302
+ },
2303
+ {
2304
+ name : "secrets array items" ,
2305
+ content : `
2306
+ services:
2307
+ test:
2308
+ image: alpine
2309
+ secrets:
2310
+ -
2311
+ secrets:
2312
+ test2:
2313
+ file: ./httpd.conf` ,
2314
+ line : 5 ,
2315
+ character : 8 ,
2316
+ list : & protocol.CompletionList {
2317
+ Items : []protocol.CompletionItem {
2318
+ {
2319
+ Label : "gid" ,
2320
+ Detail : types .CreateStringPointer ("string" ),
2321
+ TextEdit : textEdit ("gid: " , 5 , 8 , 0 ),
2322
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2323
+ },
2324
+ {
2325
+ Label : "mode" ,
2326
+ Detail : types .CreateStringPointer ("number or string" ),
2327
+ TextEdit : textEdit ("mode: " , 5 , 8 , 0 ),
2328
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2329
+ },
2330
+ {
2331
+ Label : "source" ,
2332
+ Detail : types .CreateStringPointer ("string" ),
2333
+ TextEdit : textEdit ("source: " , 5 , 8 , 0 ),
2334
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2335
+ },
2336
+ {
2337
+ Label : "target" ,
2338
+ Detail : types .CreateStringPointer ("string" ),
2339
+ TextEdit : textEdit ("target: " , 5 , 8 , 0 ),
2340
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2341
+ },
2342
+ {
2343
+ Label : "test2" ,
2344
+ TextEdit : textEdit ("test2" , 5 , 8 , 0 ),
2345
+ },
2346
+ {
2347
+ Label : "uid" ,
2348
+ Detail : types .CreateStringPointer ("string" ),
2349
+ TextEdit : textEdit ("uid: " , 5 , 8 , 0 ),
2350
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2351
+ },
2352
+ },
2353
+ },
2354
+ },
2355
+ {
2356
+ name : "secrets array items across two files" ,
2357
+ content : `
2358
+ ---
2359
+ services:
2360
+ test:
2361
+ image: alpine
2362
+ secrets:
2363
+ -
2364
+ ---
2365
+ secrets:
2366
+ test2:
2367
+ file: ./httpd.conf` ,
2368
+ line : 6 ,
2369
+ character : 8 ,
2370
+ list : & protocol.CompletionList {
2371
+ Items : []protocol.CompletionItem {
2372
+ {
2373
+ Label : "gid" ,
2374
+ Detail : types .CreateStringPointer ("string" ),
2375
+ TextEdit : textEdit ("gid: " , 6 , 8 , 0 ),
2376
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2377
+ },
2378
+ {
2379
+ Label : "mode" ,
2380
+ Detail : types .CreateStringPointer ("number or string" ),
2381
+ TextEdit : textEdit ("mode: " , 6 , 8 , 0 ),
2382
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2383
+ },
2384
+ {
2385
+ Label : "source" ,
2386
+ Detail : types .CreateStringPointer ("string" ),
2387
+ TextEdit : textEdit ("source: " , 6 , 8 , 0 ),
2388
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2389
+ },
2390
+ {
2391
+ Label : "target" ,
2392
+ Detail : types .CreateStringPointer ("string" ),
2393
+ TextEdit : textEdit ("target: " , 6 , 8 , 0 ),
2394
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2395
+ },
2396
+ {
2397
+ Label : "test2" ,
2398
+ TextEdit : textEdit ("test2" , 6 , 8 , 0 ),
2399
+ },
2400
+ {
2401
+ Label : "uid" ,
2402
+ Detail : types .CreateStringPointer ("string" ),
2403
+ TextEdit : textEdit ("uid: " , 6 , 8 , 0 ),
2404
+ InsertTextMode : types .CreateInsertTextModePointer (protocol .InsertTextModeAsIs ),
2405
+ },
2406
+ },
2407
+ },
2408
+ },
2409
+ {
2410
+ name : "secrets array items with a prefix" ,
2411
+ content : `
2412
+ services:
2413
+ test:
2414
+ image: alpine
2415
+ secrets:
2416
+ - t
2417
+ secrets:
2260
2418
test2:
2261
2419
file: ./httpd.conf` ,
2262
2420
line : 5 ,
0 commit comments