Closed Tainted-Fool closed 2 years ago
Is this a dotnet
project? If so, you don't need mono
, try using the net6
version of the server. See my comment here for instructions on how to change server.
If you're still having problems, check the server log for issues, :OmniSharpOpenLog
Thanks for the quick update!
So I went ahead and uninstalled mono-complete with sudo apt remove --purge mono-complete
and added let g:OmniSharp_server_use_net6 = 1
to the bottom of the vimrc configuration file.
However, the issue is still there. Nothing shows up.
Here is what I get when I go back to the csharp file:
I used the command :OmniSharpOpenLog
with the newly added line and got this:
Commenting out the use_net6
line and reverting to the previous server is not working. I get no syntax highlight or anything now.
Running :OmniSharpOpenLog
shows this now.:
Maybe running that mono uninstall command broke it? because that is the only changed I've made
I can't tell from your comment if you re-installed the server with :OmniSharpInstall
after changing the use_net6
setting, but I suspect you did because the server isn't working after remove that line again. Any time you change that line in your config, you need to re-install the server, because there are different binaries that get downloaded and omnisharp-vim starts them in different ways.
But without use_net6 = 1
you do need mono
installed. You shouldn't need it installed when running the net6 version.
Yeah I was prompted to reinstall the server when I made the change. After making the change the documentation is still not showing up. It's completely blank. This is with setting use_net6 = 1
and re-installing the server again.
Running :OmniSharpFixUsings
added using Internal
to the file but the documentation is still not popping up.
Right. Look as far as OmniSharp-vim is concerned, this is working correctly. The server (OmniSharp-roslyn) is currently not giving you documentation and I'm not exactly sure why, there have been lots of issues like this in the past and they never have the same solution :sweat_smile:
Have you built your project? You may need to do that at least once before you get full server support.
That using Internal
fix is a bit suspicious. Is that a library you've added a reference to yourself? Can you share your .csproj file?
Wait what?
Your .cs file is under ~
but the server somehow thinks it should use the example.csproj
from this repo? That's peculiar, I think you've got a bit of a strange file structure there
Please try the following:
$ mkdir -p ~/cs/helloworld
$ cd !$
$ dotnet new console
$ vim Program.cs
See if you have better luck in a dedicated directory containing a .csproj file.
Note: with dotnet6 dotnet new console
will create a very minimal Project.cs
file, using default usings
and namespace
etc. so it doesn't look exactly like your current example. You can just copy your example file in if you want.
Yup that was it! It was the file structure. Big thank you for your assistance 😄
Nice one, happy to help
Hello, I am currently learning C sharp and came across this plugin for vim. I have been tinkering with the configurations for a while now but cannot seem to figure out one thing and that is getting the documentation to work. Note: I am using Kali which is a Debian distro
My vimrc has the same configurations as the example on the
README.md
file and these are the steps that I used to install dotnet.Dotnet install reference Mono install reference
Finally, I copy the vimrc configs and get prompted to install the omnisharp-roslyn server which I do. Everything seems to be working except the documentation and I really would like to have it since it would help in learning.
Any help would be greatly appreciated! Thank you