I just followed the ‘How to install’ instructions on the github - I don’t see a useGlobalStartupFile
or useWorkspaceStartupFile
option in the in the palette settings when I search for supercollider. Do I need to follow the build instructions under ‘Development’ section of the github to access the features you’re talking about?
I was facing the exact same issue due to a mismatch between the VSCode extension (v0.03) and the latest Language Server quark version. I solved it by using the version of the Language Server quark embedded in the VSCode extension once installed (I am using VSCode on Windows with a remote SSH tunnel to a Mini-PC running Arch Linux):
cp -r ~/.vscode-server/extensions/scott carver.vscode-supercollider-0.0.3/LanguageServer.quark/ ~/.local/share/SuperCollider/downloaded-quarks
mv ~/.local/share/SuperCollider/downloaded-quarks/LanguageServer.quark ~/.local/share/SuperCollider/downloaded-quarks/LanguageServer
These commands are for Linux, but there should be a similar setup on MacOS.
Afterwards, when starting sclang
, I then faced another error related to extString.sc
, which I simply replaced with the latest version of the Language Server quark repo (this one).
Everything is now working apart from the Go to Declarations / Implementations / References
which are not working at all. Go to Definition
is working well though.
Hope this helps!
Hey Asher - I fixed the issue you were seeing. You can pull the latest LanguageServer quark and, if you want, get the latest vscode extension as well (Update publisher id · scztt/vscode-supercollider@76c1cba · GitHub). Let me know if you see startup files working again,
What was the error you saw with urlDecode
? The old version you’re using is very likely to cause other problem.
Also, all of the “Go to” actions should work as expected with the newest language server and vscode plugin. If you’re up to date, try setting the log level to “Info” (the setting supercollider.languageServerLogLevel
), and then try using one of the command that isn’t working and post the log, I can try to see what’s going on?
Hey Scott,
Thanks a lot for fixing the issue.
-
The error related to
extString.sc
was something aroundreplacements
variable not being defined (this is solved anyway with the latest VSCode extension you mentioned above - see below). -
There is a typo in the latest extension on GitHub (file extension should be
.vsix
instead of.visx
). -
After uninstalling the VSCode extension and the quarks, reinstalling the latest extension and using the
Supercollider: Update LanguageServer.quark to most recent supported version
command, everything works well (including loading thestartup.scd
file and the “Go to” actions) but I am still getting the warnings @asher described above:
WARNING: Extension in '/home/ayalavalva/.local/share/SuperCollider/downloaded-quarks/LanguageServer/Providers/InitializeProvider.sc' overwrites Main:startup in main class library.
WARNING: Extension in '/home/ayalavalva/.local/share/SuperCollider/downloaded-quarks/LanguageServer/Providers/InitializeProvider.sc' overwrites Platform:startupFiles in main class library.
WARNING: Extension in '/home/ayalavalva/.local/share/SuperCollider/downloaded-quarks/LanguageServer/SystemOverrides/extServer.sc' overwrites Meta_Server:fromName in main class library.
WARNING: Extension in '/home/ayalavalva/.local/share/SuperCollider/downloaded-quarks/LanguageServer/SystemOverrides/extServer.sc' overwrites Server:addr_ in main class library.
Intentional overwrites must be put in a 'SystemOverwrites' subfolder.
Renaming the SystemOverrides
folder into SystemOverwrites
, and placing the file InitializeProvider.sc
into that folder gets rid of these warnings.
- I am also receiving this last warning:
*** Welcome to SuperCollider 3.14.0-dev. *** For help type ctrl-c ctrl-h (Emacs) or :SChelp (vim) or ctrl-U (sced/gedit).
***LSP READY***
[LANGUAGESERVER.QUARK] suggestedServerPortRange: nil
SCDoc: Indexing help-files...
SCDoc: Indexed 1997 documents in 0.65 seconds
[LANGUAGESERVER.QUARK] Overwriting provider for method 'initialize' <-- this one
Deferred(-418090460)
Booting server 'localhost' on address 127.0.0.1:57110.
Let me know if you need me to provide additional details.
Hey @ayalavalva, thanks for the super detailed reports. I believe all of these issues are now resolved in the latest LanguageServer quark + vscode extension.
I won’t publish an official version bump for the LanguageServer / vscode plugin yet, but there are some interesting changes in the newest builds of each:
- I finally had time to fully merge Jens Haase’s great server status view to the VSCode plugin. Current builds will now show:
This can be hidden via the normal vscode mechanism (right-click on the status bar). In addition, there’s a new setting that allows you to configure the string thats displayed in the status bar. For example:☐ SUPERCOLLIDER ☐ CPU: ${peakCPU}% ☐ SYNTHS: ${numSynths} ☐
shows:
Clicking the status indicator will boot the server. Jens’ original change allowed killing the server by clicking on the status indicator - but I found that it was very easy to accidentally (or unknowingly) click it and kill the server while I was working. This feels too risky for e.g. a performance context, so I left it out for now.
-
The behavior around restarting the language, compile errors, crashes, etc. should be drastically improved now. In all cases I’ve tested, the “restart sclang” command now works immediately rather than e.g. waiting for timeouts or simply not working at all.
-
Every VSCode workspace has it’s own sclang instance. This can easily create server collisions, since the default server port is hard coded. Now, the VSCode plugin has a “Auto Allocate Server Ports” option (this defaults to enabled) that will suggest an unused server port to the LanguageServer, to avoid collisions. Note that it’s not doing anything particularly smart (for the time being) regarding e.g. checking for port availability or detecting errors, it’s just allocating different port numbers for each workspace. In the end this should be transparent to the user, except that opening multiple SuperCollider workspaces should just work.
-
I’ve been experimenting with improved error / backtrace reports in the language server. The eventual goal here would be to formalize the LSP reports in a way that could be more intelligently displayed by an IDE. The changes for now are mostly small aesthetic things, but IMO it does represent incremental improvements over the build-in class lib error reporting. This can be enabled via the “Improved Error Reports” option (this requires a language restart as well).
Newest vscode extension build is here:
Language Server can be updated via Quarks.update("https://github.com/scztt/LanguageServer.quark")
Thanks all for the great bug reports - I’ve been able to address many but not all. Hopefully the newer builds are feeling more stable and usable.
A more general question: would it be useful some time for me to do a ~1 hr interactive video session, to walk through basic setup and use of the VSCode plugin and answer questions / help people out, etc?
And, if so, is there someone using the plugin on Windows and/or Linux that would be willing to be on hand to triage questions for those platforms?
Feel free to just like this post if you are interested.
Thank you! I was able to update to the latest build and LanguageServer and now see the server status information. This is such a nice feature!
I am running into a problem that I’ve had in the past where the help documents are empty and white. I was able to fix that in the past by evaluating a SCDoc.renderAll
command in the SC-IDE but this time around it has no effect. I’d appreciate any suggestions to get my help docs back!
The docs load up fine in SC-IDE. I am running 3.14.0-dev.
edit: evaluating HelpBrowser.openBrowsePage;
in vs code does bring up the documentation in a new window. However command-D will open up a blank panel with supercollider.help
in the tab header.
another edit: it looks like there’s already an issue created in github, so at least it’s not unique to me