Open bruce-c-liu opened 1 month ago
You could just add a second entry which catches these cases: **/.*
: [${dirname}] ${filename}
Does this work for you?
Almost!
However, .markdownlint.json
renders as [<parent folder>] .markdownlint
, whereas I want it with the extension: [<parent folder>] .markdownlint.json
.
Essentially, I want to always render [<parent folder>] <full file name>
. It seems providing a variable for the full file name would be the easiest solution here. 😅
I see. We have this issue open #210166 which is regarding giving better access to parts of the filename when there are multiple extensions in it. I think it would make sense to also fix both of this issues together.
Leaving this issue open as it includes some good examples
Quick followup that the updated ${extname(n)}
syntax in the newest VSCode release (1.91.0) still doesn't address this issue.
My setting:
**: [${dirname}] ${filename}.${extname}
File names:
Makefile
[parentDirName] Makefile
[parentDirName] Makefile.${extname}
.nvmrc
[parentDirName] Makefile
[parentDirName] .nvmrc.${extname}
Note how ${extname}
is appended literally. I assume because it couldn't find a "real" extension?
Please consider my suggestion of "providing a variable for the full file name".
I can see how having a fullFileName
variable could make this easier. For the meantime, I think it should be possible to use these patterns to solve your scenario:
**/?*.*: [${dirname}] ${filename}.${extname}
**: [${dirname}] ${filename}
Nice! That does indeed work for all my scenarios. Thanks!
Awesome feature! I've been using the following config: **: [${dirname}] ${filename}.${extname}
However, there's a slight problem with dot files. (e.g.
.zshrc
) The above config renders it as[prevDirectory] .zshrc.
, but I want it without the ending dot. Is that possible with the current levers?