Configuration
forgels.toml settings, log levels, and Foundry remappings
Configuration is optional. Without any file, ForgeLS runs with defaults and prints no warnings.
forgels.toml
Place an optional forgels.toml next to the working directory the binary starts in:
publish_delay_ms = 200
log_level = "warn"| Key | Default | Meaning |
|---|---|---|
publish_delay_ms | 200 | Quiet period after the last keystroke before diagnostics publish |
log_level | "warn" | One of error, warn, info, debug, trace |
root | none | Default workspace root when the editor sends none |
remappings | [] | Prefix remappings in Foundry prefix=target form |
Missing files mean defaults with no warnings. Broken files fall back to defaults and print one forgels: ... warning per problem to stderr. Valid keys in a broken file still apply.
CLI flag
forgels --log-level debugThe --log-level <error|warn|info|debug|trace> flag wins over the file.
Foundry remappings
ForgeLS also reads foundry.toml in the working directory:
- Explicit
remappingswin when present. - When absent, known
srcdeps (forge-std,ds-test) resolve tolib/<name>/src/if that folder exists. - Otherwise each subfolder of every
libsdir becomesname/=lib/name/.
Explicit forgels.toml remappings always win over the Foundry fallback.
Editor checklist
- Command:
forgels - Transport: stdio
- Language id:
solidity, file pattern*.sol - Multi-root workspaces are supported; files whose root is removed are evicted