iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📑

Implementing VS Code File Nesting Config for a Cleaner Workspace

に公開
2022/08/30

Introduction

file nesting config is a configuration snippet that tidies up your file tree.
It's easy to set up, so let me quickly introduce it!

How to set up

Open the setting.json file by pressing command + shift + P.

Simply add the following to setting.json! (Add or remove file names as needed)

// Add
  "explorer.fileNesting.patterns": {
    "pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml",
    ".gitignore": ".gitattributes",
    "readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md",
    "*.dart": "$(capture).g.dart, $(capture).freezed.dart",
},

With the changes above, files like pubspec.yaml can be expanded and collapsed like a folder.

Also, nesting generated files like freezed files and JSON files, which are usually not reviewed, can improve the readability of your file tree!

References

https://github.com/antfu/vscode-file-nesting-config

Conclusion

That's all.

Finally, here's an introduction to the company I currently work for 🙌

https://driglo.net/

Driglo Inc. is looking for new engineers, PMs, and designers to join our team.
Please feel free to apply from here with the following information:

① Which employment type (full-time employee, part-time, freelance, etc.) you are interested in
② Your compatible development languages and other skills, and years of experience for each
③ Date of birth and highest level of education

Discussion