Studio settings files
Where cTurtle Studio keeps your settings, shortcuts, window layout, crash recovery and recent projects, and how to reset them. Studio writes all of these itself; you normally change them through Studio, not by hand.
Where the files are
| File | Holds |
|---|---|
cturtle-studio.settings | Autosave and extra language servers. |
cturtle-studio.commands | Your custom keyboard shortcuts and recent palette commands. |
cturtle-studio.layout | Dock sizes and which views are open. |
cturtle-studio.recovery | Unsaved edits, for recovery after a crash. |
.cturtle-studio-recent-projects | The recent-projects list. |
| Platform | Folder |
|---|---|
| Windows | %LOCALAPPDATA% (recent projects: %USERPROFILE%) |
| Linux, macOS | $XDG_CONFIG_HOME if set, otherwise ~/.config (recent projects: ~) |
Inside each project Studio also keeps:
| File | Holds | Version control |
|---|---|---|
.studio-native-build | Your local toolchain settings; see below. | Don't commit |
.cturtle-studio/ | Generated files for code navigation. Safe to delete. | Don't commit |
Resetting
Close Studio and delete the file. Studio starts with defaults for that file
next time. Deleting cturtle-studio.recovery throws away any unsaved edits
waiting to be recovered.
If a file can't be read, or another Studio window changed it, Studio reports it, uses defaults or stops saving that file for the session, and leaves the file on disk alone.
Environment variables
Set these to keep Studio's files somewhere else (each takes the full file path), or to start Studio in a particular way.
| Variable | Effect |
|---|---|
CTURTLE_STUDIO_SETTINGS | Settings file path. |
CTURTLE_STUDIO_COMMANDS | Shortcuts file path. |
CTURTLE_STUDIO_LAYOUT | Layout file path. |
CTURTLE_STUDIO_RECOVERY | Recovery file path. |
CTURTLE_STUDIO_RECENTS | Recent-projects file path. |
CTURTLE_STUDIO_AUTOPLAY | Any value other than empty or 0 starts Play as soon as the project opens. |
CTURTLE_STUDIO_BT_LSP | Use a different BT language server executable. |
To open a project at startup, pass its .ctproject or game.json path to
the Studio launcher.
cturtle-studio.settings
The one Studio file you might edit by hand, to add language servers for other languages (for example C). Format is JSON:
{
"autosave": 30,
"languageServers": [
{
"name": "C/C++",
"languageId": "cpp",
"extensions": [".c", ".h"],
"command": ["clangd", "--compile-commands-dir={root}/build"]
}
]
}
| Field | Type | Default | Description |
|---|---|---|---|
format | object | none | Optional file format version. Older files had "schema": 1; delete that line, or Studio reports the file as unreadable. |
autosave | integer | 0 | Seconds of idle time before changed files are saved: 0 (off), 5, 30 or 60. |
languageServers | array | [] | Extra language servers. The BT server is built in and isn't listed here. |
Each language server:
| Field | Type | Description |
|---|---|---|
name | string | Name shown in Studio. |
languageId | string | The language's LSP ID, such as cpp. |
extensions | array of strings | File extensions it handles, each starting with .. |
command | array of strings | Program and arguments. It starts in the project folder. |
In command, an argument that is exactly {root} (project folder),
{manifest} (project file), {studio} (Studio's install folder) or
{declarations} (the project's generated BT declarations folder) is replaced
with that path. See
Language servers.
cturtle-studio.commands
Your keyboard shortcuts. Change them in Studio; see Commands and shortcuts. Delete the file to restore the default shortcuts.
cturtle-studio.layout
Dock sizes and open views. Delete it to restore the default layout. See Workspace.
cturtle-studio.recovery
Unsaved edits. After a crash, Studio offers to restore them the next time it starts.
.studio-native-build
Your machine's settings from Build Settings > Native Toolchain: CMake,
C compiler, build configuration and, for projects with C code, the CMake
source folder, build folder and target. They're used when building projects
with C code and for aot_linked exports. These paths differ between
computers, so keep this file out of version control. See
Building from Studio.