Preferences

Overview

The Preferences dialog is the single entry point for all editor-global settings — everything that is not part of the open project but rather configures the editor itself, the connection to a runtime, and post-upload behaviour.

Open the dialog through Edit > Preferences... (some themes place it under Tools > Preferences... instead). Press F1 while the dialog has focus to open this page directly.

Preferences
+-- Editor          (font, tab width, line numbers)
+-- Runtime         (anvild host/port, Anvil debug, network scanner)
+-- PLC             (build mode, auto-start, persist, monitoring)
+-- AI Assistant    (LLM endpoint, tokens, temperature)

Editor

Controls how text appears in the ST code editor and every other text input field.

FieldMeaning
FontFont family. Pre-filtered to monospaced fonts (recommended: JetBrains Mono, Cascadia Code, Consolas).
Font sizeFont size in points. Default 10.
Tab widthNumber of spaces per tab stop. Default 4.
Show line numbersShows running line numbers in the gutter of the code editor.

Runtime

Connection to an anvild daemon and IPC diagnostics.

FieldMeaning
HostPLC hostname or IP. Default localhost.
Portanvild gRPC port. Default 50051.
UserUser name for token authentication.
Anvil DebugIPC diagnostic level (Off, Errors only, Verbose). Adds extra stats to the anvild log — useful to track down Iceoryx topic drift in production.

In addition: Auto-Connect on start automatically connects to the last successfully connected anvild on editor startup — handy on a dedicated engineering laptop.

The Network Scanner block on the same tab scans the LAN for Modbus TCP devices (port 502) and ForgeIEC runtimes (port 50051) and inserts hits into the bus configuration.

PLC

Controls what happens after an Upload to the PLC.

FieldMeaning
Compile ModeDevelopment (live monitoring + forcing enabled) or Production (stripped binary, no debug bridges — security boundary).
PLC autostartAutomatically starts the PLC runtime after a successful upload, skipping the confirmation dialog.
Persist enabledEnables periodic persistence of VAR_PERSIST/RETAIN variables to /var/lib/anvil/persistent.dat. Values survive a runtime restart.
Persist polling intervalSeconds between automatic save passes (default 5 s).
Monitor historyNumber of samples per variable in the oscilloscope recorder (default 1000).
Monitor intervalSample interval in milliseconds for live monitoring (default 100 ms).

Library

Sync behaviour for the standard library between the editor resource and the PLC-side library path — see Library for the full drift model. Two modes:

  • Auto-Push off (default) — on connect the editor only logs a hint in the Output panel when drift is detected. Push happens manually via Tools > Sync Library.
  • Auto-Push on — on every detected drift the editor pushes its local library version automatically. Useful in a single-programmer setup.

AI Assistant

Optional code completion against a local OpenAI-compatible LLM server (LM Studio, Ollama, llama.cpp, vLLM).

FieldMeaning
Enable AI AssistantToggles inline completion.
API EndpointOpenAI-compatible endpoint, e.g. http://localhost:1234/v1.
Max TokensPer-request response limit. Default 2048.
TemperaturePrecise (0.1), Balanced (0.3), Creative (0.7), Wild (1.0).

UX state (auto-persisted)

The following fields are stored in the background without going through the Preferences dialog, so the editor reopens in the exact state in which you left it:

  • Window geometry + window state (windowGeometry, windowState)
  • Splitter and header positions (splitterState, headerState)
  • Output panel height (outputPanelHeight)
  • Last opened project (lastProject) and the recent-files list
  • Session state: open POU tabs, active tab, cursor and scroll position per POU

Settings storage

Settings are stored via Qt’s QSettings, platform-specific:

PlatformPath
WindowsRegistry: HKCU\Software\ForgeIEC\ForgeIEC Studio
Linux~/.config/ForgeIEC/ForgeIEC Studio.conf
macOS~/Library/Preferences/io.forgeiec.studio.plist

Deleting that file / registry key resets all settings to default — useful after a botched upgrade.

Planned extensions

Backlog (cluster R phase 3): the Output panel will get its own severity colours (error red, warning yellow, info white) and a configurable font size. Both options will then appear here on a new Output tab.

  • Library — sync behaviour between editor and runtime.
  • Bus configuration — project-scoped settings that do not live here but on the bus segment / device itself.