# Reference: profile > Neutral, exhaustive description of `rickub.com/turbo-editors/turbo-core/profile`. `Profile` is the value an editor built on turbo-core differs by. Every field that would otherwise be a hardcoded name, path or command is here. ## Profile | Field | Type | Default | Description | | --- | --- | --- | --- | | `Name` | `string` | `""` | What the editor calls itself, in window titles and the About box. `"Turbo Go"`. Also sent to the language server as the client's name. | | `Slug` | `string` | `""` | Its one-word name. `"turbo-go"`. The binary, the project directory, the user directory and the environment variables are all derived from it. | | `Language` | `string` | `""` | What the editor is for, in prose meant to be read. `"Go"`, `"Rust"`. Appears in messages and in the About box, not in file formats. | | `ToolsMenu` | `string` | `""` | The label of the toolchain menu, with its hot key marked between tildes. `"~G~o"`, `"Rus~t~"`. | | `RootMarkers` | `[]string` | `nil` | Files that mark a project's root, in the order they are looked for. `["go.mod"]`, `["Cargo.toml"]`. Empty means no walk up. | | `Server` | `Server` | zero | The language server. The zero value means the editor runs without one. | | `Templates` | `Templates` | zero | The starter files the editor offers to write. | ### Derived values | Method | Returns | Example for `Slug: "turbo-go"` | | --- | --- | --- | | `ProjectDir()` | `string` | `".turbo-go"` | | `UserDir()` | `string` | `"~/.config/turbo-go"`, or `""` when the system has no configuration directory | | `ThemeDir()` | `string` | `"~/.config/turbo-go/themes"`, or `""` | | `DirEnvVar()` | `string` | `"TURBO_GO_DIR"` | | `ThemeDirEnvVar()` | `string` | `"TURBO_GO_THEME_DIR"` | | `SnippetDirEnvVar()` | `string` | `"TURBO_GO_SNIPPET_DIR"` | `UserDir` returns the value of `DirEnvVar` when it is set. `ThemeDir` returns the value of `ThemeDirEnvVar` when it is set, and that variable names the theme directory itself rather than the directory above it. A slug's dashes become underscores in an environment variable name: `turbo-rust` gives `TURBO_RUST_THEME_DIR`. ## Server | Field | Type | Default | Description | | --- | --- | --- | --- | | `Command` | `string` | `""` | The executable's name, looked up on PATH first. `"gopls"`, `"rust-analyzer"`. | | `Args` | `[]string` | `nil` | The arguments it is started with. gopls takes `["serve"]`; rust-analyzer takes none. | | `InstallHint` | `string` | `""` | One command the user can copy when the server is missing. Shown on the status bar, so it must fit on a line. | | `Dirs` | `[]string` | `nil` | Extra directories searched after PATH, in order. Empty strings are skipped. | ### Example ```go profile.Server{ Command: "gopls", Args: []string{"serve"}, InstallHint: "go install golang.org/x/tools/gopls@latest", Dirs: []string{goBinDir()}, } ``` ## Templates | Field | Type | Formatting arguments, in order | | --- | --- | --- | | `Settings` | `string` | the theme name (`%q`), the autosave delay (`%q`) | | `Snippets` | `string` | the ungrouped group's name (`%s`), the user's own snippets path (`%s`) | | `Tools` | `string` | none | A template with the wrong number of verbs produces `%!s(MISSING)` or `%!(EXTRA …)` in the file that is written; nothing checks it for you. ### Example ```go const settingsTemplate = `# turbo-go project settings. [editor] theme = %q autosave = false autosave_delay = %q ` ``` ## Errors `profile` returns no errors. A `Profile` with an empty `Slug` produces a project directory called `"."` and environment variables called `_DIR`; nothing refuses it. ## See also - [Talk to a language server](../how-to/talk-to-a-language-server.md) - [Write the starter files](../how-to/write-the-starter-files.md)