firenvim
firenvim copied to clipboard
doesnt work to edit files on github
- OS Version: clear linux 35470
- Browser Version: Firefox 95.0.2
- Browser Addon Version: 0.2.11
- Neovim Plugin Version: 0.2.11
What I tried to do
edit https://github.com/nobodyatandnothing/test/blob/main/test
What happened
firenvim doesnt run
Hi, thanks you for trying Firenvim. Could you try to go through the steps of the troubleshooting guide ( https://github.com/glacambre/firenvim/blob/master/TROUBLESHOOTING.md ) and let me know what the result is?
i went through the steps with no results. firenvim works nicely everywhere else, even github issues and comments
Oh, I see, I thought you meant that Firenvim didn't work at all.
I can't try it at the moment but I suspect I will be able to reproduce this problem. Unfortunately I think it's pretty likely to be caused by Github security settings and that I won't be able to fix it because the browser extension APIs aren't powerful enough. I'll let you know what the problem is exactly when I'm in front of a computer :).
thank you
Huh, actually it looks like there aren't any CSP/security issues here, the editor seems to swallow the focus event that Firenvim relies on. Using
let g:firenvim_config = {
\ 'localSettings': {
\ 'github.com': { 'selector': 'textarea:not([readonly]), div[role="textbox"], #code-editor' }
\}
\}
Is enough to make the firenvim frame pop up automatically and you can write to the page but somehow Github is unable to process the written output (can't get previewing to work). They probably have a postprocessor somewhere that needs to be called after the write to CodeMirror. Reverse-engineering Github's editor is going to be a very time-consuming task and I probably won't be able to work on that any time soon.
Thanks a lot for the report :).
I wonder if they have some fallback system for if/when the full editor doesn't work. I wonder if you blocked some part of the CodeMirror instance from loading (say with an add block rule for testing) if it would revert to some simpler textarea based edit window that would be easier to work from.