File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
tests/test-sources/plugins/by-name/blink-cmp Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 406
406
} ;
407
407
} ;
408
408
} ;
409
+
410
+ # Test that a provider plugin's settings are propagated to `plugins.blink-cmp.settings.providers`
411
+ provider-settings =
412
+ {
413
+ config ,
414
+ options ,
415
+ lib ,
416
+ ...
417
+ } :
418
+ let
419
+ expectEqual = name : expected : actual : {
420
+ assertion = expected == actual ;
421
+ message = ''
422
+ Expected ${ name } to equal:
423
+ ${ lib . generators . toPretty { } expected }
424
+ But found:
425
+ ${ lib . generators . toPretty { } actual }
426
+ '' ;
427
+ } ;
428
+ in
429
+ {
430
+ test . buildNixvim = false ;
431
+ assertions = [
432
+ ( expectEqual "config.plugins.blink-cmp-git.blink.settings" {
433
+ name = "git" ;
434
+ module = "blink-cmp-git" ;
435
+ bar = "bar" ;
436
+ opts . foo = "foo" ;
437
+ } ( lib . filterAttrs ( _ : v : v != null ) config . plugins . blink-cmp-git . blink . settings ) )
438
+ ( expectEqual "config.plugins.blink-cmp.settings.sources.providers.git" {
439
+ name = "git" ;
440
+ module = "blink-cmp-git" ;
441
+ bar = "bar" ;
442
+ opts . foo = "foo" ;
443
+ } ( lib . filterAttrs ( _ : v : v != null ) config . plugins . blink-cmp . settings . sources . providers . git ) )
444
+ ] ;
445
+
446
+ plugins . blink-cmp . enable = true ;
447
+ plugins . blink-cmp-git = {
448
+ enable = true ;
449
+ settings = {
450
+ foo = "foo" ;
451
+ } ;
452
+ blink . settings = {
453
+ bar = "bar" ;
454
+ } ;
455
+ } ;
456
+ } ;
409
457
}
You can’t perform that action at this time.
0 commit comments