-
Notifications
You must be signed in to change notification settings - Fork 167
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
Can't run omnisharp-roslyn (macOS) #832
Comments
No, not really. Can you run that command from inside macvim with :call job_start(['/Users/frarees/.cache/omnisharp-vim/omnisharp-roslyn/run', '-s', '/Users/frarees/Developer/Unity/sandbox/sandbox.sln'', '-e', 'utf-8'], #{out_cb: {_,m->execute('unsilent echom ' . string(m))}}) |
Copy-pasted your command. It returns:
Invoking through
mono is in my path (installed via
|
Well if you can run Can you run |
Oops, I had an extra ' in there, the actual command is: :call job_start(['/Users/frarees/.cache/omnisharp-vim/omnisharp-roslyn/run', '-s', '/Users/frarees/Developer/Unity/sandbox/sandbox.sln', '-e', 'utf-8'], #{out_cb: {_,m->execute('unsilent echom ' . string(m))}}) |
Tried your command, gives me no output this time.
|
Oh yeah since it is erroring, we should include the error output in the command: :call job_start(['/Users/frarees/.cache/omnisharp-vim/omnisharp-roslyn/run', '-s', '/Users/frarees/Developer/Unity/sandbox/sandbox.sln', '-e', 'utf-8'], #{out_cb: {_,m->execute('unsilent echom ' . string(m))}, err_cb: {_,m->execute('unsilent echom ' . string(m))}}) That will probably output the "mono not found" message again |
So how are you adding mono to your path? Does brew do it itself? Or do you do it in e.g. a .bashrc or something? Because a .bashrc won't be being sourced from within vim, it'd need to be in something like .profile or .bash_profile. I use zsh and set environment variables like path in .zshenv, not .zshrc |
You've been using omnisharp-vim from macvim for a long time though - have you changed something in your config? It used to work for you (according to our previous discussions). |
I've been using VimR for years now, trying MacVim again since I've formatted my laptop. So it's likely that my setup has changed. I see that it's defined in /etc/paths.d/mono-commands. I've noticed it could be a problem of macOS' open behaviour:
I open the app using https://docs.unity3d.com/ScriptReference/Unity.CodeEditor.CodeEditor.OSOpenFile.html, which is not the usual Process.Start(). This is how I had it coded back in the day when I used MacVim. For what it's worth, this seems not to be a omnisharp-vim issue (although it could do a better job at informing this? I didn't get any output until I enabled debug mode), so I'll keep digging see why MacVim is not getting env vars inherited. |
Do you want to try to comment out these lines, and see if you get good warnings when you load macvim? https://github.com/OmniSharp/omnisharp-vim/blob/master/autoload/OmniSharp/proc.vim#L109-L111 Those lines were added to prevent warnings after a job was stopped, but they are possibly also the issue here. |
Oh funny, I added the error suppression for closed channels as a result of another of your issues, #629 |
Is it possible to specify the mono path at vimrc level? |
No. We specify run the path to the https://github.com/OmniSharp/omnisharp-roslyn/blob/master/mono-packaging/run |
This uses the .NET 6 (and above) native .NET, rather than configuring Mono. To do this, we need to configure OmniSharp and also ensure `DOTNET_ROOT` is set correctly for everything to work. OmniSharp/omnisharp-vim#832 https://stackoverflow.com/a/72225758 https://stackoverflow.com/a/73896444
MacVim on Ventura 13.1.
Invoking
On terminal works fine. Any ideas?
The text was updated successfully, but these errors were encountered: