I want to know is there a way to add an option "Open in VS Code" for Right Clicking a folder in Ubuntu 20 (Focal Fossa). I know its possible for a file using Nautilus but is it possible for a folder?

I want to know is there a way to add an option "Open in VS Code" for Right Clicking a folder in Ubuntu 20 (Focal Fossa). I know its possible for a file using Nautilus but is it possible for a folder?

Add inode/directory; to the .desktop launcher of the application to have it also appear in the right-click "Open with other application" item for a folder.
The answer is Exclusively for xfce user. So it can be Xubuntu or mint-22 xfce
Xfce user generally wants to configure the commands by themselves rather cloning any github command. To enable Open In code option in context menu follow the below instruction.
bash -c 'if [ -d "%f" ]; then code "%f"; else code "%f"; fi'Shift+ODirectories**, Text Files, Other FilesYour end results should look like this,