I installed VSCode as the only text editor and whenever I tried to open a file, it opened a new empty window. I realized that the "code.desktop" file has an argument called "--unity-launch" and it didn't make sense to be there. Since I removed it, my problem has been resolved.
This can still be reproduced because of the `--enable-wayland-ime` launch argument. Removing it makes VSCode open whatever file you tried to open instead of opening a new empty "session". Using Plasma/Wayland 6.2.3 if that matters. See also: https://www.reddit.com/r/kde/comments/1fyvtb8/vscode_doesnt_open_files_instead_it_just_starts/
The cause mentioned in the Reddit thread isn't the sole cause. The .desktop file should add `--` right before `%U` to tell VSCode that argument parsing is complete, see: https://github.com/microsoft/vscode/issues/234479 Alternatively, Nix fixed it by replacing `--enable-wayland-ime` with `--enable-wayland-ime=true` to specify the argument for the flag, see: https://github.com/NixOS/nixpkgs/pull/361341
Hey, This issue will be solved with https://github.com/gentoo/gentoo/pull/38689 If you can please confirm it's indeed the case. Thanks !
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63a6681d4a31af0199594ab932b1be4f0da9a583 commit 63a6681d4a31af0199594ab932b1be4f0da9a583 Author: Adel KARA SLIMANE <adel.ks@zegrapher.com> AuthorDate: 2024-09-22 14:46:02 +0000 Commit: Arthur Zamarin <arthurzam@gentoo.org> CommitDate: 2024-12-28 08:32:34 +0000 app-editors/vscode: desktop file fixups Closes: https://bugs.gentoo.org/936915 Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> app-editors/vscode/files/code-url-handler.desktop | 3 ++- app-editors/vscode/files/code.desktop | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-)