C# Omnisharp Roslyn Configuration
The details below describe how to install and configure the C# Omnisharp Roslyn language server found
here.
Installing the Language Server
To install the language server download the latest
omnisharp-win-x64.zip binaries found
here.
NOTE: This testing described below was done using the v1.32.9 release.
Extract the contents of the zip file taking note of that folder location.
In this case the zip file was extracted to the folder location shown below with that folder containing the language server executable:
C:\Project\omnisharp\
Directory of C:\Project\omnisharp
22/01/2019 07:02 PM 8,192 OmniSharp.exe
Check the language server binary by running the following command:
C:\Project\omnisharp\OmniSharp.exe -?
That command should result in the following output:
Usage: [options]
Options:
-? | -h | --help Show help information
-s | --source Solution or directory for OmniSharp to point at (defaults to current directory).
-l | --loglevel Level of logging (defaults to 'Information').
-v | --verbose Explicitly set 'Debug' log level.
-hpid | --hostPID Host process ID.
-z | --zero-based-indices Use zero based indices in request/responses (defaults to 'false').
-pl | --plugin Plugin name(s).
-d | --debug Wait for debugger to attach
-lsp | --languageserver Use Language Server Protocol.
-e | --encoding Input / output encoding for STDIO protocol.
Configuration
Start Zeus and use the
Options, Document Types menu to edit the C# document type and in the
Language Server panel apply the following configuration settings:
Program Type: Executable
Program: C:\Project\omnisharp\OmniSharp.exe
Directory: $wdd
Arguments: -lsp
-z
NOTE: The fully qualified executable name can omitted the directory details if the executable folder is found in the system PATH
environment variable.
The $wdd value used for the directory is a Zeus tag that will evaluate to the workspace drive and directory. This means the language server will start in that workspace folder if a workspace is open.
Using the Language Server
To test the configuration create a simple test.cs
file and fire off an auto-complete request:
Released: 3rd January 2025