File tree 3 files changed +284
-151
lines changed
3 files changed +284
-151
lines changed Original file line number Diff line number Diff line change @@ -1343,7 +1343,33 @@ This will render:
1343
1343
1344
1344
The default mapping to expand/collapse nested files is <space> .
1345
1345
1346
-
1346
+ A `priority` field can be added to each rule to resolve conflicting rules. The
1347
+ default priority is 100. In the event that two rules may match the same file,
1348
+ the rule with higher priority will win. If the priorities are the same, the
1349
+ rule with a lower key value will win.
1350
+ >lua
1351
+ require("neo-tree").setup({
1352
+ nesting_rules = {
1353
+ ["bar"] = {
1354
+ pattern = "(.+)%.bar$",
1355
+ files = { "%1.baz" },
1356
+ priority = 100,
1357
+ },
1358
+ ["foo"] = {
1359
+ pattern = "(.+)%.foo$",
1360
+ files = { "%1.baz" },
1361
+ priority = 200,
1362
+ },
1363
+ -- Without the priorities, "bar" < "foo", so bar would apply first.
1364
+ }
1365
+ })
1366
+ <
1367
+ This will render:
1368
+ >
1369
+ a.bar
1370
+ a.foo
1371
+ a.baz
1372
+ <
1347
1373
HIGHLIGHTS *neo-tree-highlights*
1348
1374
1349
1375
The following highlight groups are defined by this plugin. If you set any of
You can’t perform that action at this time.
0 commit comments