File tree Expand file tree Collapse file tree 1 file changed +81
-5
lines changed
tests/test-sources/plugins/bufferlines Expand file tree Collapse file tree 1 file changed +81
-5
lines changed Original file line number Diff line number Diff line change
1
+ { lib , pkgs , ... } :
1
2
{
2
3
empty = {
3
4
plugins . bufferline . enable = true ;
124
125
} ;
125
126
} ;
126
127
127
- no-packages = {
128
- plugins . bufferline = {
129
- enable = true ;
130
- iconsPackage = null ;
128
+ default-packages =
129
+ { config , ... } :
130
+ {
131
+ plugins . bufferline = {
132
+ enable = true ;
133
+ } ;
134
+
135
+ assertions = [
136
+ {
137
+ assertion =
138
+ config . extraPlugins != [ ]
139
+ -> lib . any (
140
+ x :
141
+ lib . trace "${ x . pname or x . name } " x . pname or x . name != null && x . pname or x . name == "bufferline.nvim"
142
+ ) config . extraPlugins ;
143
+ message = "nvim-web-devicons package wasn't found when it was expected" ;
144
+ }
145
+ {
146
+ assertion =
147
+ config . extraPlugins != [ ]
148
+ -> lib . any (
149
+ x :
150
+ lib . trace "${ x . pname or x . name } " x . pname or x . name != null
151
+ && x . pname or x . name == "nvim-web-devicons"
152
+ ) config . extraPlugins ;
153
+ message = "nvim-web-devicons package wasn't found when it was expected" ;
154
+ }
155
+ ] ;
156
+ } ;
157
+
158
+ no-packages =
159
+ { config , ... } :
160
+ {
161
+ plugins . bufferline = {
162
+ enable = true ;
163
+ iconsPackage = null ;
164
+ } ;
165
+
166
+ assertions = [
167
+ {
168
+ assertion =
169
+ config . extraPlugins != [ ]
170
+ -> lib . any (
171
+ x :
172
+ lib . trace "${ x . pname or x . name } " x . pname or x . name != null
173
+ && x . pname or x . name != "nvim-web-devicons"
174
+ ) config . extraPlugins ;
175
+ message = "nvim-web-devicons package was found when it wasn't expected" ;
176
+ }
177
+ ] ;
178
+ } ;
179
+
180
+ package-overrides =
181
+ { config , ... } :
182
+ {
183
+ plugins . bufferline = {
184
+ enable = true ;
185
+ iconsPackage = pkgs . vimPlugins . mini-nvim ;
186
+ } ;
187
+
188
+ assertions = [
189
+ {
190
+ assertion =
191
+ config . extraPlugins != [ ]
192
+ -> lib . any (
193
+ x : lib . trace "${ x . pname or x . name } " x . pname or x . name != null && x . pname or x . name == "mini.nvim"
194
+ ) config . extraPlugins ;
195
+ message = "mini-nvim package wasn't found when it was expected" ;
196
+ }
197
+ {
198
+ assertion =
199
+ config . extraPlugins != [ ]
200
+ -> lib . any (
201
+ x :
202
+ lib . trace "${ x . pname or x . name } " x . pname or x . name != null
203
+ && x . pname or x . name != "nvim-web-devicons"
204
+ ) config . extraPlugins ;
205
+ message = "nvim-web-devicons package was found when it wasn't expected" ;
206
+ }
207
+ ] ;
131
208
} ;
132
- } ;
133
209
}
You can’t perform that action at this time.
0 commit comments