Nvim for sc installation

Hi, I’m a bit of a newbie here but I was trying to install the Sc plugin for Neovim (https://github.com/davidgranstrom/scnvim) and was denied permission to create the symlink when running these instructions on the command line:

mkdir -p ~/Library/Application\ Support/SuperCollider/Extensions/scide_scvim
ln -s <~/Library/Application\ Support/SuperCollider/Extensions/scide_scvim
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file … target_dir
link source_file target_file
.>/sc ~/Library/Application\ Support/SuperCollider/Extensions/scide_scvim
-bash: /sc: Permission denied

Do you know how I can sort it out?

Which OS are you running?

In Linux you need to use absolute paths to make it work. Alternatively you can put the scnvim/sc directory into your compile path in your sclang config file. On my phone now, so can’t verify exactly.

Oh, I’m in macOS Mojave, running also the latest sc, thanks.

What are the exact commands you have used?

The syntax is ln -s <target> <link>. Did you fill in the link bit?

I installed nvim, then I created the directory:

mkdir -p ~/Library/Application\ Support/SuperCollider/Extensions/scide_scvim


ln -s <~/Library/Application\ Support/SuperCollider/Extensions/scide_scvim>/sc ~/Library/Application\ Support/SuperCollider/Extensions/scide_scvim/scnvim

Ah, the < and > are just there as place holders and shouldn’t be typed

1 Like

And better use absolute paths (not ~/…)

1 Like

On Linux this means /home/user/.config… instead of ~/.config… Not sure what the paths are on mac these days, but should start with /

1 Like

It should work on mac if you do:

ln -s ~/Library/Application\ Support/SuperCollider/Extensions/scide_scvim/sc ~/Library/Application\ Support/SuperCollider/Extensions/scide_scvim/scnvim

… assuming those paths exist. On mac at least, the shell does the expansion of “~” before it sends the path to the command, so this is fine for ln. IIRC the thing that can get you in trouble is relative paths, e.g. ./scnvim, which bakes the relative path into the link. Unless you want that, which you probably don’t.

1 Like

That’s great, it worked, many thanks!!