Tip: Improving VS Code's display of mod.rs files

A conversation on Zulip led to someone mentioning a recent new feature in VS Code where the display of certain file names can be customized. In particular, if you add this configuration:

  "workbench.editor.customLabels.patterns": {
    "**/mod.rs": "${dirname}/mod.rs"
  },

then rather than labeling mod.rs files with the directory name only if you have more than one open, VS Code will always display the directory name — and even include it in file search results. The same thing could be done with lib.rs, main.rs, build.rs and other such file names.

16 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.