Where can I find editor-specific folder (scide_vscode)?
you need to create this folder within the LanguageServer folder (in downloaded-quarks)
Ah thanks! It works!
~/Library/Application Support/SuperCollider/downloaded-quarks/LanguageServer/scide_vscode/LSPDocument.sc
Ah, Iâll make this change in the quark, I didnât know this supported arbitrary ide names.
The Document class still desperately needs refactoring, there are some features that are broken or work weirdly in VSCode, but this definitely lowers the priority.
I tried that new folder idea, removed all extensions, reinstalled the quark. I still get this:
ERROR: Message âaddRawRecvFuncâ not understood.
Perhaps you misspelled âaddOSCRecvFuncâ, or meant to call âaddRawRecvFuncâ on another receiver?
If anyone had that issue and knows how to solve it Iâd be super happy to try it.
It looks like youâll need a newer build of SuperCollider - this feature was merged in April. Any of the recent green develop
builds here: Workflow runs ¡ supercollider/supercollider ¡ GitHub should work.
Specifically, this is the most recent one I see: Merge pull request #6113 from dyfer/topic/storeOn-printOn ¡ supercollider/supercollider@a0644a7 ¡ GitHub
(builds are under âArtifactsâ at the bottom)
ok I read that somewhere but as I had the tip of releases I thought it meant I was right⌠but in effect I need to be on the tip of the dev branch!
ohhhhhh you guys are on CI too for your dev branch! Iâll use that now. Is it stable and gig-ready?
and it wooooorrkkkkkk!!!
(I resisted inserting here a Frankenstein gif. You are welcome.)
Usually a âstableâ build has gone through some period of feature freeze and testing before release â which is what makes it stable. âTip of devâ isnât stable in this sense. But, practically speaking (and anecdotally), Iâve been running from dev for a long time and havenât experienced any bad behavior from that (i.e. I havenât been reverting to a tagged release for shows, without issue).
hjh
Hi again Scott - there is a collision with API quark which I have been using (duplicate JSON class)- would it be worth adding API as a dependency rather than rolling your own? otherwise I can factor out methods I need perhapsâŚ
ok I love it all thanks @scztt for the hard work on this. The one thing I miss now from SCIDE is the ability to autocomplete arguments with tab (especially in Fluid* land where we have LOADS of arguments so we are likely to use preset on many and need to skip to some further in the list)
Did I miss a shortcut or is it not implemented?
(oh I also miss not being able to execute example code from the help browser but that I can live with
oooook Iâll stop giving love but HOW COULD I CODE WITHOUT VARIABLE AUTOCOMPLETE BEFORE!!!
(sorry for the love and enthusiasm - that feature is so useful in my other langages but I got use not to have it in SC - you know, you just gave me a gateway drug)
thanks again. Iâll stop the outpour of love for now
Can you file an issue with LanguageServer.quark so I remember? Right now, we have several different JSON read/write implementations in both the core and different quarks, each with their own quirks and bugs, so I found it safer to include my own here until thereâs one âsettledâ implementation. Iâll test the version in API and either use that or rename the one in LanguageServer to something private so it doesnât collide.
Yes, the autocompete of function arguments is a bit different in VSCode, Iâm not totally happy with it for usage in SuperCollider. What SHOULD work:
- When you start typing a method invocation (after the first paren), e.g.
SinOsc.ar(
, you should see a popup with one or more method signatures, with all arguments and default values. - You can switch through these with the up/down arrow keys (minus: this is pretty inconvenient for cases where thereâs a LOT of possible matching methods).
- If youâre in the middle of typing a method call and you want to show the popup after itâs hidden, you want the âTrigger Parameter Hintsâ VSCode command - you can assign this to any keyboard shortcut you want.
- If you donât see parameter hints at all, they may be disabled - look in your vscode settings for âParameter Hintsâ or
editor.parameterHints.enabled
- Parameter hints donât work well for method calls that span multiple lines. This will be fixed in the future, but I need to access the parsed sclang code for this to work.
- Thereâs a slightly different workflow for methods to: you should see a list of potential methods BEFORE you type the first paren, e.g.
SinOsc.ar
- you can select a method from the list and hit tab and you will get all the arguments pre-populated. You can tab through them and start typing immediately to replace the argument name with a value. (minus: it takes several extra keystrokes to remove an argument if you donât want it at all, so complex method signatures are still annoying). - For really complex statements, you can create code snippets. The snippets system in VSCode is extremely sophisticated and customizable: Snippets in Visual Studio Code / Snippets â TextMate 1.x Manual. \
- I plan to make it possible in the future for Quarks to provide their own snippets collections, and maybe to provide custom snippets / completions for specific methods. In the mean time, you might try making some snippets specifically for the Fluid classes - if these are helpful, they can get integrated for everyone to use eventually.
This still has some issues, unfortunately. If anyone has experience with javascript/typescript debugging, it should be relatively easy to fix - I can point in the right direction.
Finally: if there are subtle improvements you can think of for e.g. method signatures, please let me know or experiment yourself. All of the implementation is in sclang code:
- The structure for method signature hints is here - Iâve implemented much, but not all, of the available functionality.
- The provider that supplies method argument hints is here - specifically this generates the response: https://github.com/scztt/LanguageServer.quark/blob/develop/Providers/SignatureHelpProvider.sc#L36
- The guts of the response, and the snippet that shows the arguments etc is generated here: https://github.com/scztt/LanguageServer.quark/blob/develop/LSPDatabase.sc#L310
all of that is clear and some are improvement for me on SCIDE. but this is not what I was refering to.
In SCIDE, if you type SinOsc.ar(
then if you hit tab, it autopopulates and skips, so 3 tabs will enter mul:
- it is super convenient for methods that have huge number of arguments. That is what I miss - autocomplete of named arguments (if that is the way to call this)
sadly not. James Bradbury and @weefuzzy were the JS magicians I worked with. Iâll try to get through the next FluCoMa release without a team, then Iâll come back to help I hope.
thanks again for your development work (and patience!)
I just published a new version of the vscode plugin with some preliminary improvements to path handling. It would be super helpful if people could test to see how things are behaving, I think itâs a big improvement for the first-launch usability.
What has changed:
- We now have reasonable default values for the sclang_conf.yaml and sclang executable:
https://github.com/scztt/vscode-supercollider/blob/develop/src/util/defaults.ts#L43
https://github.com/scztt/vscode-supercollider/blob/develop/src/util/defaults.ts#L46 - If you do not have an explicit path specified in your vscode settings, the defaults will be used. For many users, this should never require explicit configuration at all.
- If an sclang executable is not detected, the user gets a coherent error message and has an option to find the executable with a file dialog. If this fails, they should be prompted again the next time they try to start sclang.
- If the user selects an sclang executable from the dialog box, this is written into the settings so they are not prompted in the future.
I donât know if I got the paths correct on Windows and Linux - for sclang conf, I followed the behavior of SuperCollider itself.
What to test:
Obviously, be careful about preserving your working configuration so you can go back to it after testing
-
Try removing the
sclang.cmd
andsclang.confYaml
settings in vscode, and restarting VSCode. If you have SuperCollider installed in a normal, default location (e.g. âProgram Filesâ on Windows), everything should work as expected. -
Try moving your SuperCollider installation to a non-standard location. You should see a dialog when you try to launch sclang in VSCode - see if you can use the open file dialog to locate your sclang executable - everything should work after this.
-
Make sure manually setting a path for the sclang_conf and sclang executable still works correctly.
-
If you can, read through the linked source files above and see if the path logic matches what you see on your system - especially for Windows and Linux, where I donât have as much knowledge about standard paths.
Iâm super open to feedback here about what should happen. Ideally, a user that has a âdefaultâ installation of SuperCollider should not need to do any configuration at all, at at worse theyâll get a one-time request to find sclang, and then never see it again.
Iâm also adding an option soon to pick up the sclang_conf from the local workspace, which means you can have per-workspace configurations.
do we have to install a new version of the quark too? it is in that folder that we had to change location of the infamous âdocumentâ class def so I wonder if that has been changed.
if not no worried, Iâll update anyway
It doesnât on MacOS. When I remove both the error is:
Otherwise I need to have a confYaml to avoid Document class conflicts with flucoma so I canât help much.
it does indeed⌠but as above even in the normal location
they do. thanks!
if the message was less ominous maybe - the zxxzx is what frightened me