Documentation

Settings & Preferences

ThinkCode offers extensive customization options through its settings system. This guide will help you understand how to configure ThinkCode to match your personal preferences and optimize your development workflow.

Settings Overview

ThinkCode settings are organized in a hierarchical structure that allows for:

  • Global settings: Applied across all workspaces
  • Workspace settings: Specific to the current project
  • Folder settings: Applied to specific folders
  • Language-specific settings: Applied only to certain file types

Settings can be managed through both a user-friendly UI and JSON configuration files.

Accessing Settings

There are several ways to access ThinkCode settings:

  1. Settings UI:

    • Click the gear icon in the lower left corner
    • Use the keyboard shortcut: Ctrl+, (Windows/Linux) or Cmd+, (macOS)
    • From the Command Palette: Ctrl+Shift+P then search for "Preferences: Open Settings"
  2. JSON Settings:

    • From the Command Palette: Search for "Preferences: Open Settings (JSON)"
    • Directly edit the settings files in your user directory

Settings UI

The Settings UI provides a user-friendly interface for adjusting ThinkCode's behavior:

Settings UI Screenshot

Key features of the Settings UI:

  • Search bar: Quickly find specific settings
  • Categories: Browse settings by functional area
  • Descriptions: Detailed explanations of each setting
  • Default values: Reference for original values
  • Modified indicator: Highlights customized settings

Settings Files

ThinkCode stores settings in JSON files:

  • User Settings: ~/.thinkcode/settings.json (global settings)
  • Workspace Settings: .thinkcode/settings.json in your project root (project-specific settings)
  • Folder Settings: .thinkcode/settings.json in specific subdirectories

Example settings.json file:

{
  "editor.fontSize": 14,
  "editor.fontFamily": "Fira Code, Consolas, 'Courier New', monospace",
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.wordWrap": "on",
  "editor.minimap.enabled": true,
  "files.autoSave": "afterDelay",
  "files.autoSaveDelay": 1000,
  "workbench.colorTheme": "ThinkCode Dark",
  "ai.assist.enabled": true,
  "ai.contextSize": "medium"
}

Settings Categories

ThinkCode settings are organized into the following main categories:

Editor

Configure the code editor appearance and behavior:

{
  "editor.fontSize": 14,
  "editor.lineHeight": 22,
  "editor.fontFamily": "JetBrains Mono, monospace",
  "editor.wordWrap": "on",
  "editor.minimap.enabled": true,
  "editor.cursorBlinking": "smooth",
  "editor.cursorSmoothCaretAnimation": true,
  "editor.formatOnSave": true,
  "editor.suggestSelection": "first",
  "editor.linkedEditing": true
}

Files

Control how files are handled:

{
  "files.autoSave": "afterDelay",
  "files.autoSaveDelay": 1000,
  "files.exclude": {
    "**/.git": true,
    "**/.DS_Store": true,
    "**/node_modules": true
  },
  "files.associations": {
    "*.mdx": "markdown"
  },
  "files.encoding": "utf8",
  "files.eol": "\n"
}

Workbench

Customize the ThinkCode UI:

{
  "workbench.colorTheme": "ThinkCode Dark",
  "workbench.iconTheme": "thinkcode-icons",
  "workbench.editor.showTabs": true,
  "workbench.sideBar.location": "left",
  "workbench.editor.enablePreview": true,
  "workbench.list.smoothScrolling": true,
  "workbench.startupEditor": "welcomePage"
}

AI Features

Configure ThinkCode's AI capabilities:

{
  "ai.assist.enabled": true,
  "ai.contextSize": "medium",
  "ai.model.preferredVersion": "latest",
  "ai.inlineCompletions.enabled": true,
  "ai.inlineCompletions.delay": 150,
  "ai.suggestions.maxResults": 5,
  "ai.privacy.dataSharingLevel": "minimal",
  "ai.contextProviders.git.enabled": true,
  "ai.contextProviders.workspace.enabled": true
}

Terminal

Configure the integrated terminal:

{
  "terminal.integrated.fontSize": 14,
  "terminal.integrated.fontFamily": "MesloLGS NF, monospace",
  "terminal.integrated.shell.windows": "powershell.exe",
  "terminal.integrated.shell.osx": "/bin/zsh",
  "terminal.integrated.shell.linux": "/bin/bash",
  "terminal.integrated.copyOnSelection": true,
  "terminal.integrated.cursorBlinking": true
}

Language-Specific Settings

Apply settings only to specific languages using the [language] syntax:

{
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.tabSize": 2
  },
  "[python]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "ms-python.python",
    "editor.tabSize": 4
  },
  "[markdown]": {
    "editor.wordWrap": "on",
    "editor.quickSuggestions": {
      "comments": "off",
      "strings": "off",
      "other": "off"
    }
  }
}

Settings Profiles

ThinkCode supports settings profiles for different development contexts:

  1. Creating a Profile:

    • Command Palette → "Preferences: Create Settings Profile"
    • Name your profile (e.g., "Frontend Development", "Python Projects")
  2. Switching Profiles:

    • Click the profile name in the status bar
    • Command Palette → "Preferences: Select Settings Profile"
  3. Exporting/Importing Profiles:

    • Profiles can be exported as .thinkcode-profile files
    • Share profiles with teammates for consistent environments

Settings Sync

Keep your settings consistent across devices:

  1. Enable Settings Sync:

    • Command Palette → "Settings Sync: Turn On"
    • Select which settings to sync (themes, snippets, keybindings, etc.)
  2. Configure Sync Options:

    • Automatic sync (real-time updates)
    • Manual sync (on-demand updates)
    • Conflict resolution preferences
  3. Sync Status:

    • View sync status in the lower left corner
    • Resolve conflicts through the UI

Best Practices

  1. Use Workspace Settings for project-specific configurations to ensure consistency across team members
  2. Comment Your Settings using JSON comments (// comment) to document custom configurations
  3. Organize Settings logically by grouping related configurations
  4. Version Control your workspace settings to share with teammates
  5. Regularly Review settings to remove outdated configurations
  6. Use Profiles for different development scenarios

Troubleshooting Settings

If you encounter issues with settings:

  1. Reset to Defaults: Command Palette → "Preferences: Reset Settings to Default Values"
  2. Check for Conflicts: Look for conflicting settings between user and workspace levels
  3. Validate JSON: Ensure proper JSON syntax in settings files
  4. Reload Window: Command Palette → "Developer: Reload Window" to apply changed settings
  5. Check Extensions: Some extensions may override or conflict with certain settings

Advanced: Settings Automation

ThinkCode supports programmatic settings management:

// Example: settings-manager.ts
import * as thinkcode from 'thinkcode-api';
 
export async function setProjectSettings() {
  await thinkcode.workspace.getConfiguration().update('editor.formatOnSave', true);
  await thinkcode.workspace.getConfiguration('ai').update('contextSize', 'large');
}

For more details on available settings, refer to the ThinkCode API documentation or use the integrated settings search feature.

On this page