scvim icon indicating copy to clipboard operation
scvim copied to clipboard

scvim fails to start with nvim

Open claudiocabral opened this issue 6 years ago • 6 comments

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

claudiocabral avatar Oct 03 '19 14:10 claudiocabral

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.

capocasa avatar Nov 06 '19 23:11 capocasa

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

claudiocabral avatar Nov 07 '19 07:11 claudiocabral

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..

x37v avatar Mar 15 '20 16:03 x37v

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

lpil avatar Aug 13 '20 22:08 lpil

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

capocasa avatar Aug 13 '20 22:08 capocasa

@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

x37v avatar Aug 14 '20 16:08 x37v