Skip to content

Instantly share code, notes, and snippets.

@ravenlp
Created July 5, 2024 01:42
Show Gist options
  • Save ravenlp/ebca917f6f3722e94e24edfd0227f0d4 to your computer and use it in GitHub Desktop.
Save ravenlp/ebca917f6f3722e94e24edfd0227f0d4 to your computer and use it in GitHub Desktop.
Visual Studio Code config to show better tab labels on a NextJs 14 project
{
"workbench.editor.customLabels.patterns": {
"**/app/**/[[]*[]]/[[]*[]]/page.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • page",
"**/app/**/[[]*[]]/page.tsx": "${dirname(1)}/${dirname} • page",
"**/app/**/page.tsx": "${dirname} • page",
"**/app/**/[[]*[]]/[[]*[]]/default.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • default",
"**/app/**/[[]*[]]/default.tsx": "${dirname(1)}/${dirname} • default",
"**/app/**/default.tsx": "${dirname} • default",
"**/app/**/[[]*[]]/[[]*[]]/layout.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • layout",
"**/app/**/[[]*[]]/layout.tsx": "${dirname(1)}/${dirname} • layout",
"**/app/**/layout.tsx": "${dirname} • layout",
"**/app/**/[[]*[]]/[[]*[]]/template.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • template",
"**/app/**/[[]*[]]/template.tsx": "${dirname(1)}/${dirname} • template",
"**/app/**/template.tsx": "${dirname} • template",
"**/app/**/[[]*[]]/[[]*[]]/error.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • error",
"**/app/**/[[]*[]]/error.tsx": "${dirname(1)}/${dirname} • error",
"**/app/**/error.tsx": "${dirname} • error",
"**/app/api/**/route.ts": "${dirname(0)} • route",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment