Just wanna shime in and state that the position "firenvim doesn't work with flatpak or snap" was true in the past, but due to effort by great people does not hold true anymore.
The problem you describe is basically the same as keepassxc-browser had in the past. As I use it actively with snap on Ubuntu 22.04, I was sure that I could achive the same with firenvim, by just following their troubleshooting guide.
How to get firenvim running with snap/flatpak
install firenvim as described in the documentation
give the firenvim browser extension permission to use the native messaging host using
Just wanna shime in and state that the position "firenvim doesn't work with flatpak or snap" was true in the past, but due to effort by great people does not hold true anymore.
The problem you describe is basically the same as keepassxc-browser had in the past. As I use it actively with snap on Ubuntu 22.04, I was sure that I could achive the same with firenvim, by just following their troubleshooting guide.
How to get firenvim running with snap/flatpak
flatpak permission-set webextensions firenvim snap.firefox yes