Default applications (mime) for everything?

Thank you for the assistance. I read the instructions and after taking a backup of the file and deleting it, I still get the same behavior.

Weirdly enough, I have none of the files in the linked documentation:

[user@host xdg]$ ls ~/.config/mimeapps.list  /etc/xdg/mimeapps.list ~/.local/share/applications/mimeapps.list /usr/local/share/applications/mimeapps.list /usr/share/applications/mimeapps.list
ls: cannot access '/home/user/.config/mimeapps.list': No such file or directory
ls: cannot access '/etc/xdg/mimeapps.list': No such file or directory
ls: cannot access '/home/user/.local/share/applications/mimeapps.list': No such file or directory
ls: cannot access '/usr/local/share/applications/mimeapps.list': No such file or directory
ls: cannot access '/usr/share/applications/mimeapps.list': No such file or directory

Yet still, when I query what opens a folder I get:

[user@host xdg]$ xdg-mime query default inode/directory
dev.lapce.lapce.desktop

This is the same as the behaviour in Gnomes “Settings → Default applicaitons” where after uninstalling VSCode it switched “Calendar” to Lapce as the default (instead of VSCode).

I removed lapce and this happened:

[user@host ~]$ yay -Rncs lapce
[sudo] password for user:
checking dependencies...

Package (1)  Old Version  Net Change

lapce        0.2.7-1      -93.16 MiB

Total Removed Size:  93.16 MiB

:: Do you want to remove these packages? [Y/n]
:: Processing package changes...
(1/1) removing lapce                                                                             [--------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating the desktop file MIME type cache...

[user@host ~]$ xdg-mime query default inode/directory
org.gnome.Nautilus.desktop

This is finally sensible. But still, the “Settings → Default applicaitons” now gives “Neovim” which tells me I still have a problem… In fact, I re-installed lapce and got back to the editor being used:

[user@host ~]$ xdg-mime query default inode/directory
dev.lapce.lapce.desktop

So it seems to me that that somehow GNOME decides to use the “editor” for missing mime types? Where would I find this configuration so I can fix it?

EDIT: I reinstalled visual-studio-code-bin and now:

[user@host ~]$ xdg-mime query default inode/directory
code.desktop