Files
code-tools/tf/scripts/windsurf-setup.sh
2025-08-24 21:47:21 -04:00

68 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "🌊 Setting up Windsurf IDE support..."
# Create Windsurf configuration directories
mkdir -p /home/coder/.windsurf/data/User
mkdir -p /home/coder/.windsurf/extensions
# Create optimized Windsurf settings
cat > /home/coder/.windsurf/data/User/settings.json << 'WINDSURF_SETTINGS_END'
{
"workbench.colorTheme": "Windsurf Dark",
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
},
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000,
"terminal.integrated.fontSize": 13,
"git.enableSmartCommit": true,
"git.confirmSync": false,
"python.defaultInterpreterPath": "/home/coder/.venv/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"typescript.preferences.includePackageJsonAutoImports": "auto",
"javascript.preferences.includePackageJsonAutoImports": "auto",
"windsurf.ai.enabled": true,
"windsurf.ai.showInEditorContextMenu": true,
"windsurf.chat.enabled": true,
"windsurf.codeCompletion.enabled": true
}
WINDSURF_SETTINGS_END
# Create development keybindings
cat > /home/coder/.windsurf/data/User/keybindings.json << 'WINDSURF_KEYS_END'
[
{
"key": "ctrl+shift+a",
"command": "windsurf.chat.open"
},
{
"key": "ctrl+shift+c",
"command": "windsurf.ai.generateCode"
},
{
"key": "ctrl+shift+r",
"command": "windsurf.ai.refactorSelection"
},
{
"key": "ctrl+shift+e",
"command": "windsurf.ai.explainCode"
}
]
WINDSURF_KEYS_END
# Set proper ownership
if id -u coder >/dev/null 2>&1; then
chown -R coder:coder /home/coder/.windsurf
fi
echo "✅ Windsurf IDE support configured"
echo "🌊 Windsurf AI features enabled with optimized settings"
echo "⌨️ Keyboard shortcuts: Ctrl+Shift+A (chat), Ctrl+Shift+C (generate), Ctrl+Shift+R (refactor)"