exercism / codemirror-lang-wren

Wren language support for the CodeMirror code editor.
MIT License
3 stars 4 forks source link

(chore) bump to CodeMirror 6 release dependencies #20

Closed joshgoebel closed 5 months ago

joshgoebel commented 2 years ago

Attempt to resolve #19.

This still doesn't work because it doesn't like highlightStyle in extensions, despite this working previously.

Can you help?

joshgoebel commented 2 years ago

@JRaspass Can you help me figure out why the devtools is broken?

Did they change the default theme between 0.19 and released, do you know?

JRaspass commented 2 years ago

Hmm, I might be shooting blind here but in my codebase we have stuff like:

syntaxHighlighting(HighlightStyle.define([
    { color: '#98c379', tag: tags.literal },
    { color: '#e06c75', tag: tags.regexp  },
])

Instead of your tagHighlighter([...]). With syntaxHighlighting and HighlightStyle coming from @codemirror/language.

And that works fine? I do find the docs a little confusing though, I think they're pretty active on their forums if you get stuck though.

joshgoebel commented 2 years ago

HighlightStyle.define

That's what I had before, but when I upgraded to @lezer/highlight it looked like the API changed, let me take another look... perhaps there are just two very similar and confusing apis... but this method came from @codemirror/highlight before, so when I saw an identical APi in @lezer/highlight I assumed that was the same thing.

JRaspass commented 2 years ago

Yeah I think HighlightStyle moved from @codemirror/hightlight to @codemirror/language.

joshgoebel commented 2 years ago

Well now that seems to work great... anyway you could test this before I publish?

JRaspass commented 2 years ago

Tested and it's working :tada:

image (looks like range isn't quite right, but that's an issue for later, this at least works with CM6, so thank you!)

I even shipped it to live Code Golf if you wanna test it out yourself ;-) https://code.golf/fizz-buzz#wren

joshgoebel commented 2 years ago

looks like range isn't quite right

Yeah, no guarantees it's perfect. PRs welcome. :-)

joshgoebel commented 2 years ago

Any thoughts on the correct version pinning?

SleeplessByte commented 1 year ago

What is it exactly that I can help with :) ?

joshgoebel commented 1 year ago

Best practices on npm version pinning... if we want to say "entire 6.x series", is this the best way:

    "@codemirror/autocomplete": "^6.0.0",
     "@codemirror/language": "^6.0.0",
dem4ron commented 5 months ago

Hey! Exercism is moving to CodeMirror 6 ^6.0.0. This is one of the two packages that needs to be republished with later dependencies. Basically what you already have here. :) Could you please help with that?

Thanks!