supercollider / scvim

Vim plugin for SuperCollider
GNU General Public License v3.0
121 stars 28 forks source link

scvim fails to start with nvim #59

Open claudiocabral opened 5 years ago

claudiocabral commented 5 years ago

When starting from nvim, scvim fails sto initialize because it doesn't find a .vim folder, since nvim uses the .config/nvim folder. This can be easily fixed by the user by symlinking ~/.config/nvim to .vim, but the error message is very unhelpful:

SCVim could not be initialized. Consult the README to see how to install scvim.

since the readme doesn't mention anything about needing scvim to be on the .vim folder. I suggest either changing the error message to something more specific or adding a line or two in the README making it clear that scvim needs to be in the ~/.vim folder

capocasa commented 5 years ago

Yeah that shouldn't be hardcoded like that, and the error message also needs to be more helpful.

The trivial fix is to also hardcode neovim's default directory, but that would be kind of lame (but certainly workable). I'd much prefer to have something based on vim's runtimepath setting, as written about over on superuser, but if it isn't straight forward to implement hardcoding's fine.

claudiocabral commented 5 years ago

Hm the runtimepath seems to be a list of comma separated paths, so we can just split(runtimepath, ",") and iterate through it until we find something that works. Again, seems easy enough. I'll give it a shot

x37v commented 4 years ago

I have a branch that I'm using with neo vim and a pull request for it. https://github.com/supercollider/scvim/pull/64

It requires that you point supercollider at the sc directory inside your scvim checkout.. and in turn the SCVim.sc class looks for the bin etc in the directory above it.

I'll either want to setup supercollider to ignore the SCVim.sc that can be included with it, simply don't build with scvim support or delete the SCVim.sc from the appropriate dir.

I'm thinking, maybe it doesn't make sense to include SCVim with supercollider. It is easy enough to install with one of the various package managers and, scvim could pass an argument to sclang when starting to point it at the correct location for the SCVim.sc class file..

lpil commented 4 years ago

Any updates on this one? I would love to use these together 🙏

capocasa commented 4 years ago

@lpil PR is closed by creator. @x37v can you do a minimal port of your fix to master?

x37v commented 4 years ago

@lpil PR is closed by creator. @x37v can you do a minimal port of your fix to master?

@capocasa yeah, i'll try to get to this soon