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