File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
tests/test-sources/plugins/by-name/blink-cmp Expand file tree Collapse file tree 1 file changed +43
-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
+ { config , lib , ... } :
413
+ let
414
+ expectEqual = name : expected : actual : {
415
+ assertion = expected == actual ;
416
+ message = ''
417
+ Expected ${ name } to equal:
418
+ ${ lib . generators . toPretty { } expected }
419
+ But found:
420
+ ${ lib . generators . toPretty { } actual }
421
+ '' ;
422
+ } ;
423
+ in
424
+ {
425
+ test . buildNixvim = false ;
426
+ assertions = [
427
+ ( expectEqual "config.plugins.blink-cmp-git.blink.settings" {
428
+ name = "git" ;
429
+ module = "blink-cmp-git" ;
430
+ bar = "bar" ;
431
+ opts . foo = "foo" ;
432
+ } ( lib . filterAttrs ( _ : v : v != null ) config . plugins . blink-cmp-git . blink . settings ) )
433
+ ( expectEqual "config.plugins.blink-cmp.settings.sources.providers.git" {
434
+ name = "git" ;
435
+ module = "blink-cmp-git" ;
436
+ bar = "bar" ;
437
+ opts . foo = "foo" ;
438
+ } ( lib . filterAttrs ( _ : v : v != null ) config . plugins . blink-cmp . settings . sources . providers . git ) )
439
+ ] ;
440
+
441
+ plugins . blink-cmp . enable = true ;
442
+ plugins . blink-cmp-git = {
443
+ enable = true ;
444
+ settings = {
445
+ foo = "foo" ;
446
+ } ;
447
+ blink . settings = {
448
+ bar = "bar" ;
449
+ } ;
450
+ } ;
451
+ } ;
409
452
}
You can’t perform that action at this time.
0 commit comments