glacambre / firenvim

Embed Neovim in Chrome, Firefox & others.
GNU General Public License v3.0
4.68k stars 144 forks source link

Broken on https://svelte.dev/tutorial/basics #1492

Open cassepipe opened 1 year ago

cassepipe commented 1 year ago

I tried to follow the Svelte tutorial on the svelte website : https://svelte.dev/tutorial/basics A neovim window appears in the textarea and disappears instantly.

I have read the troubleshooting guide but it apparently concerns cases where neovim and the browser are not able to work together. I use firenvim flawlessly almost anywhere else.

I have tried inspecting the textarea element, I can only say it's there but I don't understand much else. I was wondering if there was any reason for why it would break there and, maybe, how to fix it.

glacambre commented 1 year ago

Firenvim correctly identifies the editor as being CodeMirror, but fails with Error: unwrap(...).CodeMirror is undefined. This could be due to svelte.dev using CodeMirror6 instead of CodeMirror 5 or due to CodeMirror being loaded in a non-standard way.

I see strings belonging to CodeMirror 5 in svelte.dev's minified JS, but I can't tell if CodeMirror 6 has them too (I somehow can't find CodeMirror 6's source code).

cassepipe commented 1 year ago

@glacambre I suppose the source code for version 6 is the following since they have another repo called codemirror5 : https://github.com/codemirror/dev

glacambre commented 1 year ago

@cassepipe I found this repo, it's not codemirror6's sources, it's a build tool to build codemirror6. I'm looking for the source code itself, preferably without having to run anything on my machine.

cassepipe commented 1 year ago

I was given this to be the repo to the source code for CM6 : https://github.com/codemirror/view

https://discuss.codemirror.net/t/where-is-codemirror-version-6-source-code/5568/2