Skip to content

feature: vendor Csound codemirror support and add Markdown features#491

Draft
Nandos0804 wants to merge 11 commits into
csound:developfrom
Nandos0804:plugin/codemirror
Draft

feature: vendor Csound codemirror support and add Markdown features#491
Nandos0804 wants to merge 11 commits into
csound:developfrom
Nandos0804:plugin/codemirror

Conversation

@Nandos0804

Copy link
Copy Markdown
Contributor

Moves codemirror from https://github.com/hlolli/codemirror-lang-csound to web-ide.

First approach on addingmulti-assignment, loop, and switch-case syntax. from Csound 7.

Add Markdown language support for .md files and enhance the file tree with an MD badge icon.

Uprading dependencies, migrate to Vite for codemirror, and improve documentation.

Nandos0804 added 11 commits May 25, 2026 09:20
…port

Fork @hlolli/codemirror-lang-csound into plugins/codemirror-lang-csound.

Grammar additions:
- multi-assignment: iAtt, iDec = 0.1, 0.4
- for/in/do/od loop syntax
- switch/case/default:/endswitch syntax
- improved <CsOptions> parsing

Updated highlighter styleTags for all new keywords.
Migrated deprecated @codemirror/text import to @codemirror/state.
Install @codemirror/lang-markdown. Detect .md/.markdown filenames
and switch the language extension to markdown() with
syntaxHighlighting(defaultHighlightStyle) instead of csoundMode().
Add 'md' category to MediaFileCategory, detect .md/.markdown in
getFileTypeIconDetails, extend fileIcons type, and add per-theme
amber/golden badge colours for all six themes.
Rename @hlolli/codemirror-lang-csound -> @csound/codemirror-lang-csound
in package.json, workspace build script, global.d.ts, editor import, and
README references. Also update CodeMirror/Lezer packages to latest and
add @codemirror/lang-markdown dependency.
@Nandos0804

Copy link
Copy Markdown
Contributor Author

Addresses #34 and moves codemirror as a vendor folder. Current used version:

Package Before Now
codemirror 6.0.1 6.0.2
@codemirror/state 6.5.0 6.6.0
@codemirror/view 6.35.3 6.43.0
@codemirror/language 6.10.6 6.12.3
@codemirror/autocomplete 6.18.3 6.20.2
@codemirror/commands 6.7.1 6.10.3
@codemirror/lint 6.8.4 6.9.6
@codemirror/search 6.5.8 6.7.0
@lezer/common 1.2.3 1.5.2
@lezer/lr 1.4.2 1.4.10
@lezer/highlight 1.2.1 1.2.3

@Nandos0804 Nandos0804 marked this pull request as draft May 26, 2026 22:27
@Nandos0804 Nandos0804 changed the title feature: vendor Csound codemirro support and add Markdown features feature: vendor Csound codemirror support and add Markdown features May 26, 2026
@kunstmusik

kunstmusik commented May 27, 2026 via email

Copy link
Copy Markdown
Member

@hlolli

hlolli commented May 27, 2026

Copy link
Copy Markdown
Member

bad me here, I should have remembered that you did codemirror. Somehow I had stored it in my brain incorrectly (and made the suggestion to vendor my ancient work). Yeh no need to re-invent the wheel, if we can use or vendor your previous work. I only say vendor if we need custom features. Which I forgot if I added to my older fork.

@kunstmusik

Copy link
Copy Markdown
Member

Happy to update this library for new features, I'm using it in the new Blue as well. It's published on NPM btw.

@Nandos0804

Copy link
Copy Markdown
Contributor Author

If I can share my view: if we all agree, I’m in favor of avoiding scattered code and maintaining different forks for the same feature set or implementation. I’m also fine with discarding all the progress made so far on this PR and starting fresh if, in the long run, it makes maintenance easier. Your call, for me is the same if we vendor or if we install https://github.com/kunstmusik/codemirror-lang-csound

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants