Configuration

SharpLsp is configured via a sharplsp.toml file placed at the root of your workspace (alongside your .sln or root .csproj). All settings have sensible defaults β the file is optional.
sharplsp.toml uses deny_unknown_fields β any key not listed below will cause a parse error at startup.
sharplsp.toml Reference
# sharplsp.toml β full configuration reference
# Every key shown is optional; defaults are applied when omitted.
# βββ Server ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[server]
# Log level: "trace", "debug", "info", "warn", "error"
log_level = "info"
# Debounce window in milliseconds for semantic requests after a keystroke
debounce_ms = 150
# βββ C# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[csharp]
# Enable the C# sidecar
enabled = true
# Path to the .sln file to load. Empty = auto-detect.
solution_path = ""
# βββ F# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[fsharp]
# Enable the F# sidecar
enabled = true
# βββ Diagnostics βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[diagnostics]
# Run Roslyn analyzers (not just compiler errors)
analyzers_enabled = true
# Analyze all files in the solution, not just open ones
solution_wide_analysis = true
# Project name patterns to include (empty = all projects)
project_filter = []
# βββ Profiler ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[profiler]
# Maximum concurrent profiling sessions
max_concurrent_sessions = 5
# Default trace duration in seconds (0 = unlimited)
default_trace_duration = 30
# Default trace output format ("speedscope", "chromium", "nettrace")
default_trace_format = "speedscope"
# Default counter providers
default_counter_providers = ["System.Runtime"]
# Default counter refresh interval in seconds
default_counter_interval = 1
# Output directory for trace/dump files
output_directory = ".sharplsp/profiles"
File Location
SharpLsp searches for sharplsp.toml by walking up the directory tree from the workspace root. The first sharplsp.toml found is used. If none is found, all defaults apply.
my-solution/
βββ sharplsp.toml β place it here
βββ MyApp.sln
βββ MyApp.Core/
β βββ MyApp.Core.csproj
βββ MyApp.Api/
βββ MyApp.Api.csproj
Per-Project Overrides
Roslyn maps .editorconfig severity settings directly to analyzer severity:
# .editorconfig
[*.cs]
dotnet_diagnostic.IDE0003.severity = warning # Remove 'this' qualification
dotnet_diagnostic.CA1054.severity = error # URI parameters should not be strings
Disabling a Language
To skip starting a sidecar entirely, set its enabled flag to false:
[fsharp]
enabled = false
Requests for that language will be rejected and no sidecar process will be spawned.