Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code beautifier to format the code #390

Open
julienbeisel opened this issue Mar 15, 2023 · 1 comment
Open

Code beautifier to format the code #390

julienbeisel opened this issue Mar 15, 2023 · 1 comment

Comments

@julienbeisel
Copy link

Hi,

I'm pretty new to Csound and I'm used to my Python tooling. In Python, I use extensively black, which allows me to format my code and do not have to worry about too many blank lines, spaces between characters...

Do you know if:

  • Csound "good practices" exist?
  • A formater already exist?
  • It would be relevant to add the feature on the online IDE?

It looks like users already developed custom scripts to do that: https://forum.cabbageaudio.com/t/code-beautifier-csound-cabbage/798

Thanks for this amazing work :)

@julienbeisel julienbeisel changed the title Code beautifier to format the code. Code beautifier to format the code Mar 15, 2023
@hlolli
Copy link
Member

hlolli commented Mar 15, 2023

I am working on moving the codemirror6 stuff into a separate project https://github.com/hlolli/codemirror-lang-csound . There is builtin support for running eslint on it, but for that to work, someone would need to write babel parser plugin for csound syntax and then write some rules. I don't think it will be too heavy lift to make a prettify function, this plugin is already aware of indentation levels, so at least it could wrap everything into correct blocks. I'll keep this ticket open, but there's a long way ahead :)

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

No branches or pull requests

2 participants