Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

dafny-lang/language-server-csharp

Repository files navigation

DafnyLS

.NET Core Code coverage

DafnyLS is a language server for Dafny. It is implemented in C# on .NET 5.0 with OmniSharp's C# Language Server Protocol.

Archived

DafnyLS is now part of the official Dafny repository and is part of the official compiler releases. Therefore, this repository has been archived, and updates will be provided as a part of Dafny releases.

Building

Clone the DafnyLS repo and its submodules.

git clone https://github.com/dafny-lang/language-server-csharp
git submodule update --init

When building DafnyLS from its source, the necessary build dependencies will be automatically downloaded from NuGet or built as a project reference.

dotnet build -c Release Source/

Running

Place the Z3 executable in the language server's root directory or within the z3/bin subdirectory (already present in the release packages). If not on windows, ensure that the executable has execution permissions:

chmod u+x ./z3/bin/z3

The language server can be started either by the executable itself (e.g., DafnyLS.exe on windows) or with the following command.

dotnet DafnyLS.dll

Configuration

It is possible to change the moment when a document is verified by providing the --documents:verify command-line argument. The options are:

  • never - Never verifies the document.
  • onchange (default) - Verifies the document with each change.
  • onsave - Verifies the document each time it is saved.

For example, to launch DafnyLS to only verify upon saving the document, use the following command:

dotnet DafnyLS.dll --documents:verify=onsave

About

Dafny Language Server implementation in C#

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages