feat(#3213): add view.width.lines_excluded option#3214
Conversation
8db86ab to
3d23432
Compare
|
Added small improvements to the |
ecb1998 to
45aa357
Compare
|
Apologies, my time is very limited right now; I will likely review this change on the weekend. |
|
Testing in Defaults OK: -- width = { },Root should grow. FAIL: it doesn't. width = {
include_root = true,
},Root explicitly should not grow. FAIL: it actually does. width = {
include_root = false,
},Long root constrained to max, OK: width = {
include_root = false,
max = 20,
},Respects min, OK: width = {
include_root = false,
min = 50,
},Respects padding, OK: width = {
include_root = false,
padding = 5,
},Respects empty table defaults: OK after changing width = { }, |
There was a problem hiding this comment.
Apologies for the late review. Looking good, please:
-
simplify this https://github.com/nvim-tree/nvim-tree.lua/pull/3214/files#r2572631362 - resolve the inverted logic for
include_root#3214 (comment) - refactor
include_rootoption https://github.com/nvim-tree/nvim-tree.lua/pull/3214/files/3d234325d1ed5411a41260ff92718b4f41540717#r2530138318
bf90a14 to
85542bc
Compare
|
Defaults OK: -- width = { },Root should grow. OK. width = {
lines_excluded = "none",
},Root explicitly should not grow. OK. width = {
lines_excluded = "root",
},Long root constrained to max, OK: width = {
lines_excluded = "none",
max = 20,
},Respects min, OK: width = {
lines_excluded = "none",
min = 50,
},Respects padding, OK: width = {
lines_excluded = "none",
padding = 5,
},Respects empty table defaults with root excluded. OK width = { }, |
|
Having It can be changed to a table of enums e.g. width = {
lines_excluded = {
"root",
"symlink",
},
},For now it can just contain After some frustrating hacking, I've added enum validation to Do you think we can implement this? |
85542bc to
761967c
Compare
|
@alex-courtis done |
alex-courtis
left a comment
There was a problem hiding this comment.
Many thanks for the great contribution @simonmandlik and thank you for handling all the unexpected changes.
lines_excluded option|
Defaults OK: -- width = { },Root should grow. OK. width = {
lines_excluded = { },
},Root explicitly should not grow. OK. width = {
lines_excluded = {
"root",
}
},Long root constrained to max, OK: width = {
max = 20,
lines_excluded = { }
},Respects min, OK: width = {
lines_excluded = { },
min = 50,
},Respects padding, OK: width = {
lines_excluded = "none",
padding = 5,
},Respects empty table defaults with root excluded. OK width = { },Checks type. OK. width = {
lines_excluded = "foo",
},Checks value. OK. width = {
lines_excluded = {
"foo",
},
}, |
Closes #3213