AndreasArvidsson/andreas-talon-vscode

Respect labelFormat setting

SimeonC opened this issue ยท 3 comments

First of all, thanks for releasing this publicly! Just the tabs view alone is super useful for the one thing I kept resorting to the mouse without fail when using Cursorless.

Would it be possible to respect the "Label Format" setting to make multiple tabs with the same file name easier to switch between? (Or something similar as doing exactly the same may be a bit difficult)

VSCode Setting

SO answer with pictures of how this works in default tabs; https://stackoverflow.com/a/50181247/1413689

CleanShot 2023-09-21 at 12 16 08

Current Problem

CleanShot 2023-09-21 at 12 16 13

Hackaround

I've hacked a solution by putting the following snippet in createItem but it's not "great" as I couldn't figure out how to get the whole tree to figure out any duplicates.

const resourceUri = tab.input instanceof vscode.TabInputText ? tab.input.uri : undefined;
const relativePath = vscode.workspace.asRelativePath(resourceUri);
const labelParts = [hint.padStart(2), " - ", relativePath || tab.label];

CleanShot 2023-09-21 at 12 48 07

Good idea!

Implemented in version 3.36.0

Nice, thanks. That looks much tidier than my hack and I didn't get time to get used to my hack either ๐Ÿ˜€
CleanShot 2023-09-21 at 18 31 54

Glad to help. We now also support all of the different label formats in the setting.