Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: File Nesting #141354

Closed
2 tasks done
JacksonKearl opened this issue Jan 25, 2022 · 5 comments
Closed
2 tasks done

Test: File Nesting #141354

JacksonKearl opened this issue Jan 25, 2022 · 5 comments

Comments

@JacksonKearl
Copy link
Contributor

JacksonKearl commented Jan 25, 2022

Refs: #6328

Complexity: 4

Create Issue


This iteration we added (experimental) support for file nesting. There are several settings to try out:

  • explorer.experimental.fileNesting.enabled, main switch for nesting. Verify that the explorer enables/disables nesting live when toggled.
  • explorer.experimental.fileNesting.expand, controls whether file nests get expanded by default upon expanding a folder's contents. (Note that expansion state is stored, so reopening a folder after toggling this has no effect)
  • explorer.experimental.fileNesting.patterns, central configuration for the whole operation. Some things to verify:
    • The vscode repo has a local configuration for this, verify that works and inheritance behaves in a way you expect
    • The prebuilt patterns work as expected (for instance*.ts => $(capture).js, $(capture).d.ts)
    • The addedExtension pattern works: * => $(capture).*
    • pathSegment patterns work: *.js => $(capture).*.js
    • Suffix/prefix/substring patterns work, for instance: foo-*.js => $(capture).js, *.js => foo-$(capture).js, *-foo.js => $(capture).js, *.js => $(capture)-foo.js, foo-*-bar.js => $(capture).js, *.js => foo-$(capture)-bar.js, etc.
    • Anything else you can think of!

Ref https://docs.microsoft.com/en-us/visualstudio/ide/file-nesting-solution-explorer?view=vs-2022 for how VS does this. Generally speaking we should be able to support anything VS does, with the exception of the generic pathSegment operator (".*": {} in VS), which we only support on a per-file extension basis: .js => $(capture)..js`

@marsen
Copy link

marsen commented Jan 25, 2022

I got it, I should download insiders version first

  • MacOS

Sorry, I didn't get it,
I add these settings in settings.json(User/MyName/Library/Application Support/Code/User/settings.json),
but it's not working, should install a special version of VSCode, or do I use the wrong setting file?

pic

@JacksonKearl
Copy link
Contributor Author

@marsen this feature is only available in the Insiders release of VS Code, at https://code.visualstudio.com/insiders/

Also, testplan-item's are assigned to vscode team members per policy, but that doesn't mean you can't file issues as well!

@sbatten
Copy link
Member

sbatten commented Jan 25, 2022

I shared some feedback with @JacksonKearl offline around ideas of supporting multiple capture groups, wildcard not allowing * to remove ambiguity, supporting virtual folders via nesting, and removing duplicated prefixes.

@sbatten sbatten closed this as completed Jan 25, 2022
@sbatten sbatten removed their assignment Jan 25, 2022
@Hextar
Copy link

Hextar commented Jan 26, 2022

@JacksonKearl works as a charm on Ubuntu 21.10.

If that could help I've tested it for vue+typescript file nesting with test, snap, and stories with the following command.

key: *.vue
value: $(capture).test.ts, $(capture).test.ts.snap, $(capture).stories.ts

@marsen

This comment has been minimized.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants