I am making a VSCode extension and I want to be able to update the priority and alignment of a status bar item.
for example:
const item = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 1000);
context.subscriptions.push(item);
setTimeout(() => {
item.alignment = vscode.StatusBarAlignment.Right;
item.priority = 0
}, 5000);
However, the icon does not move. I would appreciate any ideas or to know if it's even possible.
Yes, there is a way to imitate updating the position of an icon bar item. By disposing of the item and creating a new one with the same text value but new priority/Alignment values. You can effectively update the position of the icon live.