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

C# support #5299

Closed
undersquire opened this issue Jul 13, 2022 · 17 comments
Closed

C# support #5299

undersquire opened this issue Jul 13, 2022 · 17 comments
Labels
feature [core label] language An umbrella label for all programming languages syntax behaviors potential extension Functionality that could be implemented as an extension (consider moving to community extensions) unsupported language

Comments

@undersquire
Copy link

OmniSharp seems to be the best option for a C# language server.

@undersquire undersquire added feature [core label] triage labels Jul 13, 2022
@JosephTLyons JosephTLyons added the language An umbrella label for all programming languages syntax behaviors label Aug 23, 2022
@sheikalthaf
Copy link

@JosephTLyons any update on supporting c# in zed?

@JosephTLyons JosephTLyons changed the title C# Language Support C# support Apr 6, 2023
@hovsater hovsater added the potential extension Functionality that could be implemented as an extension (consider moving to community extensions) label Apr 30, 2023
@sheikalthaf
Copy link

Any update on this, VSCode really sucks and drain my battery very fast. Looking forward to the support

@JosephTLyons
Copy link
Collaborator

We aren't working on supporting C# directly, but we are working on extensible language support now, so the community could add this once that lands!

@0x2CA 0x2CA mentioned this issue Sep 22, 2023
1 task
@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@just-ero
Copy link

Roslyn's Language Server Protocol recently went open source: https://github.com/dotnet/roslyn/tree/main/src/Features/LanguageServer.

It should be more trivial to support all languages which use Roslyn as a compiler (C#, VisualBasic) now.

@fminkowski
Copy link
Contributor

I opened a PR for C# support.

maxbrunsfeld pushed a commit that referenced this issue Jan 30, 2024
This PR adds the C# tree-sitter grammar. It also adds OmniSharp-Roslyn
for LSP support.

Resolves issue
[#5299](#5299)

Release Notes:

- Added C# support

## VSCode
<img width="984" alt="vscode"
src="https://github.com/zed-industries/zed/assets/6967829/1f6b4cb7-4e00-4d61-8e58-2867dc5c8ecf">

## Zed
<img width="1722" alt="zed"
src="https://github.com/zed-industries/zed/assets/6967829/88436c78-93de-4e26-be15-b0dea6590c55">
@JosephTLyons
Copy link
Collaborator

C# support shipped with v0.121.0-pre!

@wk-j
Copy link

wk-j commented Feb 4, 2024

@JosephTLyons

Code action doesn't work, clicking on the suggested code action does not yield any response or result

image

@luizen
Copy link

luizen commented Mar 4, 2024

@JosephTLyons

Code action doesn't work, clicking on the suggested code action does not yield any response or result

Same here. Nothing happens when I click any of the options (Go To Definition / Find All References, etc). Am I missing something?

@Moshyfawn
Copy link
Member

My advice would be to create a separate issue if one doesn't already exist.

@fminkowski
Copy link
Contributor

Omnisharp is slow to start up. Do you still not receive any options after waiting a bit?

@luizen
Copy link

luizen commented Mar 6, 2024

I managed to have it finally working by following the workaround described here: #8352 (comment)

@abliger
Copy link

abliger commented Mar 20, 2024

Hello, I need to use the nuget package. How can LSP find the association?

@davidnagli
Copy link

Screenshot 2024-04-25 at 11 21 51

I'm running the latest Zed release (Zed 0.132.2) but I don't see C# in the language selector... am I doing something wrong?

@maxbrunsfeld
Copy link
Collaborator

@davidnagli you should have been prompted to install the C# extension:

Screenshot 2024-04-25 at 1 29 57 PM

Did that prompt not show up for you?

In any case, you can fix this by opening the Extensions pane, searching for C#, and installing the extension.

@davidnagli
Copy link

davidnagli commented Apr 25, 2024 via email

@MidKnightXI
Copy link

MidKnightXI commented Apr 26, 2024

Is it normal that I don't have any suggestions anymore for my projects in ASPNET, it was working fine some time ago and tried it out recently and nothing ?

The extension is installed on my side but I just have the "colorization" of code but nothing else?

Is it a known issue or did I do something wrong?

I tried uninstalling and reinstalling the extension and also Zed (who knows, could work) but still have the issue.

@davidnagli
Copy link

I managed to have it finally working by following the workaround described here: #8352 (comment)

@MidKnightXI Seems like a known-ish issue with a workaround which can be found there ^

I followed the workaround yesterday and it fixed my issue and got the actual language server to start (not just syntax highlighting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature [core label] language An umbrella label for all programming languages syntax behaviors potential extension Functionality that could be implemented as an extension (consider moving to community extensions) unsupported language
Projects
None yet
Development

No branches or pull requests