Open programingfrik opened 2 years ago
@razzmatazz - any clue?
@programingfrik it is hard for me to diagnose anything, but this says:
Cannot open assembly '/home/progr/.emacs.d/.cache/lsp/omnisharp-roslyn/latest/omnisharp-roslyn/OmniSharp.exe': No such file or directory.
that omnisharp.exe cannot be found on the given path.. have you setup path forwarding correctly on cygwin?
also, may I suggest you try csharp-ls? :) not sure if that will help, but that uses dotnet tool
mechanism and may work better if you have dotnet
on your $PATH
in emacs
By what I've seen so far in the parts that I've been touching, lsp-mode doesn't take into account cygwin. I don't see any "(eq system-type cygwin)" condition. Cygwin is windows but it handles the paths a la unix, so for example when lsp-mode tries to unzip the downloaded omnisharp binary it sees the powershell command and tries to use it to extract the zip file, but it calls powershell with a unix path that it doesn't understands. I solved that part putting a condition in front of the condition trying to find powershell that if it is running on cygwin to avoid using porwershell. An alternative would've been using cygpath to translate the path. I think the parts of the project that interact with the file system in some way need to be aware of cygwin. Maybe this should be feature request "support cygwin" as a platform. :-P
Obviously it is not for me to urge any changes to your dev environment, but i believe WSL/WSL2 would work better for you in this case and w/o much hacking of lsp-mode out of the box..
Well I have tried csharp-ls but it didn't work out of the box either and I didn't put much effort on seeing what was missing. I can give it another more serious try. I can also give a try to WSL. In the end is more of a whim to use omnisharp on this setting, I already use visual studio for serious work. I'll report back any news.
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
Running lsp-mode on any csharp project with omnisharp on cygwin's emacs is not supported, doesn't work.
Steps to reproduce
Just:
Expected behavior
I expect lsp-mode to work, to display the completion option in some kind of text-based context menu, and the hints, and the help and all the stuff.
Which Language Server did you use?
lsp-csharp with omnisharp.
OS
Windows
Error callstack
Anything else?
I made an attempt to modify some parts of lsp-mode.el to make it work under cygwin, got it to install omnisharp, but didn't work. Modified a bit more, got it to install windows specific version, but it didn't work either. Tried to install omnisharp for windows specific versions including the one for .net 6 (the one that I have installed) didn't work either. I also have mono installed since it tried to run omnisharp through mono.