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

Support Roslyn language server (.NET) #4278

Closed
Ruin0x11 opened this issue Dec 27, 2023 · 0 comments · Fixed by #4279
Closed

Support Roslyn language server (.NET) #4278

Ruin0x11 opened this issue Dec 27, 2023 · 0 comments · Fixed by #4279
Labels
client One or more of lsp-mode language clients

Comments

@Ruin0x11
Copy link
Contributor

Ruin0x11 commented Dec 27, 2023

There is a new Roslyn language server that's poised to be a replacement for Omnisharp, and it's been included in the C# extension for VS Code. From my research so far (mostly what's been written at neovim/nvim-lspconfig#2657), these are some things needed for integration:

  • The server only supports connecting via named pipes. On Windows, Emacs has no native way of doing this (Windows named pipes are substantially different from their Linux counterparts). The elcord extension uses a PowerShell script to work around this by converting it into a stdio process (https://github.com/Mstrodl/elcord/blob/master/stdpipe.ps1). Such a workaround may need to be versioned in lsp-mode if other servers end up using this connection type.
  • Pull diagnostic support (Support pull diagnostics (textDocument/diagnostic) #4276), since the server apparently does not support the older textDocument/publishDiagnostics method.
  • Identifying which solution file (*.sln) to open when a workspace is created. When the user picks one, a solution/open notification is sent to the server, followed by the nonstandard workspace/projectInitializationComplete notification sent to the client. This is required for most useful features like Go To Definition to function.
  • The server does not use urlencoded/hexified URIs internally, so the path/URI conversion functions need to be overridden.
  • Decompiled sources are placed into the user's %TEMP%/MetadataAsSource folder, so those should be accounted for lest lsp-mode attempt to treat the file as originating from a separate workspace.
  • Server install via downloading from NuGet (like https://github.com/jmederosalvarado/roslyn.nvim/blob/main/lua/roslyn/install.lua), since there are a lot of dependent DLLs that need to be downloaded.
@jcs090218 jcs090218 added the client One or more of lsp-mode language clients label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client One or more of lsp-mode language clients
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants