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

Installer function don't work for me #164

Closed
molleweide opened this issue Dec 20, 2021 · 11 comments
Closed

Installer function don't work for me #164

molleweide opened this issue Dec 20, 2021 · 11 comments

Comments

@molleweide
Copy link

molleweide commented Dec 20, 2021

meta info

os - macos big sur
nvim - stable install with brew instl neovim

message when calling :call scnvim#install()

Error detected while processing function scnvim#install:
line    1:
E5108: Error executing lua ...vim/site/pack/packer/start/scnvim/lua/scnvim/install.lua:68: ENOENT: no such file or directory: /Users/hjalmarjakobsson/
.local/share/nvim/site/pack/packer/start/scnvim/scide_scnvim -> /Users/hjalmarjakobsson/.local/share/SuperCollider/Extensions/scide_scnvim
stack traceback:
        [C]: in function 'assert'
        ...vim/site/pack/packer/start/scnvim/lua/scnvim/install.lua:68: in function 'link'
        [string ":lua"]:1: in main chunk
Press ENTER or type command to continue

healthcheck scnvim

scnvim: health#scnvim#check
========================================================================
## scnvim
  - ERROR: SCNvim SuperCollider classes are not installed
    - ADVICE:
      - :call scnvim#install()
  - OK: has("timers") - success
  - INFO: sclang executable: /Applications/SuperCollider.app/Contents/MacOS/sclang
  - INFO: using g:scnvim_scdoc_render_prg = /usr/local/bin/pandoc
  - INFO: using g:scnvim_scdoc_render_args = % --from html --to plain -o %
@davidgranstrom
Copy link
Owner

@molleweide Thanks for the report. Could you post the output of the following commands?

In a shell:

echo $XDG_DATA_HOME

In SuperCollider (either the IDE or using scnvim)

Platform.userExtensionDir

@molleweide
Copy link
Author

╰ echo $XDG_DATA_HOME
/Users/hjalmarjakobsson/.local/share

@molleweide
Copy link
Author

-> /Users/hjalmarjakobsson/Library/Application Support/SuperCollider/Extensions

@davidgranstrom
Copy link
Owner

davidgranstrom commented Dec 20, 2021

Thanks for your quick response! There is a mismatch between the path reported by SuperCollider and the path derived by scnvim. AFAIK SuperCollider should respect XDG_* paths for the user Extension directory, at least that was the case last time I tried this.

Did you set XDG_DATA_HOME in your shell startup config or was it already defined by the OS?

I would also be interested in the output of Platform.userAppSupportDir to see if its the same path as the Extensions dir.


Until this is solved, you can fix the issue manually by creating a symbolic link between scide_scnvim and your SuperCollider Extensions directory. It should look something like this (paths based on the output you have posted):

ln -s /Users/hjalmarjakobsson/.local/share/nvim/site/pack/packer/start/scnvim/scide_scnvim /Users/hjalmarjakobsson/Library/Application\ Support/SuperCollider/Extensions/scide_scnvim

@molleweide
Copy link
Author

I set XDG paths myself.

I would also be interested in the output of Platform.userAppSupportDir to see if its the same path as the Extensions dir.

-> /Users/hjalmarjakobsson/Library/Application Support/SuperCollider

@molleweide
Copy link
Author

i have to look into supercollider and XDG myself also!

@davidgranstrom
Copy link
Owner

If I launch nvim with XDG_DATA_HOME=~/.local/share nvim test.scd or sclang with the same envir variable set I get the expected paths. Maybe there is a problem with the wayXDG_DATA_HOME is exported in your shell configuration? You can also try and start the IDE from the command line and see if you get the expected paths from the commands mentioned above.

@molleweide
Copy link
Author

  1. i will try the command and report back.
  2. are you setting any supercollider env vars?
  3. FYI -> I am setting my environment vars with https://github.com/bevry/dorothy
  4. some of the vars are set in dorothy (above) and some are set in my personal dotfiles user dir with https://github.com/molleweide/dotfiles/blob/molleweide/config/environment.bash

just in case you are interested or want to check out yourself...

It was also a long time since I personally was using SC. Now I just want everything to run correctly in case I get time
to play around with it more so that I can integrate it into my workflow.

@molleweide
Copy link
Author

molleweide commented Dec 20, 2021

David can you please give me the command for how I start SC from the command line?
And do you know what I can search for in order to set environment vars for supercollider? I am asking because searching for sc environment variables only brings me to sort of in IDE usage help. And you have somekind of superollider config under your dotfiles?

@molleweide
Copy link
Author

molleweide commented Dec 20, 2021

SIDE NOTE
my goal later would be to try to integrate scnvim with gwatcha/reaper-keys which is a lua-vim framework
that implements a vim-bindings internally inside of reaper. I dunno if you use reaper but I have seen Maads plugin for nvim which I haven't used myself. In my own fork of reaper-keys I have implemented a feature for creating sends and routes which pretty much allows one to never ever touch the mouse inside of the GUI which is pretty cool that one can do that.
But I also want to try Maads plugin and see how it feels.

@davidgranstrom
Copy link
Owner

David can you please give me the command for how I start SC from the command line? And do you know what I can search for in order to set environment vars for supercollider? I am asking because searching for sc environment variables only brings me to sort of in IDE usage help. And you have somekind of superollider config under your dotfiles?

The executable is inside /Applications/SuperCollider.app/Contents/MacOS (note that the path might differ depending on where you have installed SuperCollider). To launch the IDE: ./Applications/SuperCollider.app/Contents/MacOS/SuperCollider

To access env variables inherited from the shell call "MY_VAR".getenv. It would be interesting to see what "XDG_DATA_HOME".getenv returns.

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