Skip to content
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

ERROR "mcs": No global executable found, check |efmls-configs-issues| for help #129

Open
princenizroh opened this issue Mar 30, 2024 · 8 comments

Comments

@princenizroh
Copy link

Why my :checkhealth show this ERROR
On mason I have installed it is omnisharp, omnisharp-mono, csharpier, csharp-language-server and that's not worked
240331_07h46m35s_screenshot
image
image

@creativenull
Copy link
Owner

Hey, correct me if I'm wrong but mcs comes builtin with the C# compiler no? Maybe the compiler is not added to your global paths.

I don't think mason provides it by default, since mason only provides you with C# LSP servers (built by community) and/or other tools that do not come builtin on the compiler.

Can you verify if you see mcs listed in the mason bin directory? For you that should be ~/.local/share/nvim/mason/bin

@princenizroh
Copy link
Author

princenizroh commented Apr 2, 2024

the compiler is installed globally
image

The meaning of " 'mcs' : No global executable found', It doesn't detect any LSP installed using mason, right?
image

Of course, such as omnisharp, omnisharp-mono, csharp-ls are already installed. It's just that mcs doesn't detect that lsp on mason. So does MCS really not support the LSP available on Mason? or any solution? I using vim doing code C# to work on Unity game development

@creativenull
Copy link
Owner

That is weird, according to the the arch linux docs mcs should come installed when you install mono. I'm looking at this link: https://wiki.archlinux.org/title/Mono

Of course, such as omnisharp, omnisharp-mono, csharp-ls are already installed. It's just that mcs doesn't detect that lsp on mason. So does MCS really not support the LSP available on Mason?

Just to re-iterate mcs has nothing to do with what you installed using Mason.nvim nor is it LSP. It's just part of the mono toolchain, so when you install mono you should be getting mcs with it too.

I don't have an arch system so I cannot test this out, but I did try it out on my ubuntu system and installing mono did indeed come with mcs.

image

You may have to try rebuilding/reinstalling mono on your system and check if mcs is present with a which mcs in the terminal.

@princenizroh
Copy link
Author

Yeah same your location mono and mcs

@princenizroh
Copy link
Author

Are you testing mcs lsp? I want to see it

@creativenull
Copy link
Owner

If your mono and mcs is already globally available then I'm not exactly sure why it's not picking it up in your config.

From my testing it should be working on a linux machine once globally available, maybe something in your config is blocking it somehow, which I cannot tell. I'm afraid you'll have to find out what is the problem on your machine.

Anyway, here is a quick video on my test case (couldn't upload to github cuz file is 40mb)

https://streamable.com/gdjhow

@princenizroh
Copy link
Author

princenizroh commented Apr 16, 2024

Thank you for show it. I don't know why that is. Maybe i will test with a different distro like debian beside arch. So maybe my environment is the problem
Here I put efmls-config https://github.com/princenizroh/dotprofiles-linux/blob/main/.config/nvim/lua/princenizroh/plugins/nvim-lspconfig.lua

@creativenull
Copy link
Owner

I see that cs = { mcs, dotnet_format } entry is not there in languages (https://github.com/princenizroh/dotprofiles-linux/blob/3ab9c8ec1c4de0ba465788f890bd2bb6aa1c7a4f/.config/nvim/lua/princenizroh/plugins/nvim-lspconfig.lua#L253)

That is how nvim filetype is defined for C# files using the cs filetype.

But I tried out your config and looks like mcs is detected for me:

Screenshot from 2024-04-16 17-57-03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants