DafnyLanguageServer 4.11.0

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package DafnyLanguageServer --version 4.11.0
                    
NuGet\Install-Package DafnyLanguageServer -Version 4.11.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DafnyLanguageServer" Version="4.11.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DafnyLanguageServer" Version="4.11.0" />
                    
Directory.Packages.props
<PackageReference Include="DafnyLanguageServer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DafnyLanguageServer --version 4.11.0
                    
#r "nuget: DafnyLanguageServer, 4.11.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DafnyLanguageServer@4.11.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DafnyLanguageServer&version=4.11.0
                    
Install as a Cake Addin
#tool nuget:?package=DafnyLanguageServer&version=4.11.0
                    
Install as a Cake Tool

DafnyLS

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

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., DafnyLanguageServer.exe on windows) or with the following command.

dotnet DafnyLanguageServer.dll

Configuration

The language server can be configured using the DafnyLanguageServer.appsettings.json file as well as using CLI arguments.

For example, if you want to configure the automatic verification through the command line:

dotnet DafnyLanguageServer.dll --documents:verify=onsave

Or using the DafnyLanguageServer.appsettings.json configuration file:

{
  "Documents": {
    "Verify": "onsave"
  }
}

Options provided through the command line have higher priority than the options provided within DafnyLanguageServer.appsettings.json.

Documents

# Sets when the automatic verification should be applied.
# Options:
# - never - Never verifies the document.
# - onchange - Verifies the document with each change.
# - onsave - Verifies the document each time it is saved.
# default: onchange
--documents:verify=onchange

Verifier

# Sets maximum execution time (in seconds) for verifications
# Default: 0 (no time limit)
--verifier:timelimit=0

# Sets the maximum number of virtual cores to use. 
# Default: 0 (use half of the available virtual cores).
--verifier:vcscores=0

# Set the caching policy (like /verifySnapshots for Dafny.exe)
# Default: 0 (no caching).
--verifier:verifysnapshots=0

# Set whether or not to compute and report verification gutter statuses
# Default: 0 (no gutter status reported).
--verifier:gutterStatus=true

Ghost Diagnostics

# Mark ghost statements
# Default: true (mark the statements)
--ghost:markStatements=true

Plugins

# Provides a path to assemblies and optional space-separated command-line arguments after a comma.
# Repeat with --dafny:plugins:0=... --dafny:plugins:1=... for multiple plugins.
--dafny:plugins:0=path\to\example.dll
--dafny:plugins:0=path/to/example2.dll,oneArgument
--dafny:plugins:0=example3.dll,"firstArgument with \" space and quote" secondArgument

# On the command-line, you'd use the following escapes for the first and third examples:
"--dafny:plugins:0=path\\to\\example.dll"
"--dafny:plugins:0=example3.dll,\"firstArgument with \\\" space and quote\" secondArgument"

# For just the dafny executable, replace `--dafny:plugins:X` by `--plugin:` that you can repeat.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on DafnyLanguageServer:

Package Downloads
DafnyServer

Package Description

DafnyDriver

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.