ionide-vscode-fsharp
ionide-vscode-fsharp copied to clipboard
Provide default settings for VSCode Explorer File Nesting feature
VSCode 1.67 provides a new File Nesting feature: docs
We should provide default explorer.fileNesting.patterns
for F# files, so that when users turn the feature on via explorer.fileNesting.enabled
F# just works.
Proposed mappings:
{
"contributes": {
"configurationDefaults": {
"[fsharp]": {
"explorer.fileNesting.patterns": {
"*.fs": "${basename}.fsi, ${basename}.fs.js, ${basename}.fs.js.map",
"*.fsl": "${basename}.fsi, ${basename}.fs",
"*.fsy": "${basename}.fsi, ${basename}.fs"
}
}
}
}
}
I think this is a very good idea
@jasiozet would you be interested in contributing the feature? it would involve adding the above to release/package.json
in the existing contributes
section, then testing that the folding works as expected.
Yes I can try to take a crack at it, but probably next week, as I have my wedding coming on Saturday :)
I think it needs to be in the main scope (not the language scope) But the problem is if it is in multiple file types it doesn't work properly:
"explorer.fileNesting.patterns": {
"*.xy": "${basename}.xy, ${basename}.xy.z, ${basename}.xy.j",
}
Produces this: and this: From my testing the last section is properly evaluated. I am not sure how to test this with contributes, maybe this will behave correctly and they would be evaluated into 1 section?
Also worth considering:
"explorer.fileNesting.enabled": true,
This also need to be enabled on global level, not language level.