Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IDE 設定

可以使用自己選擇的 IDE 開發 Osprey。

VS Code

若使用 VS Code,建議安裝下列 extensions,以取得較完整的開發體驗。

  • Python,Microsoft
  • Ruff,Astral Software
  • MyPy Type Checker,Microsoft

將下列 Settings 加入 .vscode/settings.json

{
  "python.defaultInterpreterPath": ".venv/bin/python",
  "ruff.enable": true,
  "ruff.organizeImports": true,
  "python.analysis.typeCheckingMode": "basic"
}

SML files

目前沒有 SML 專用的 editor tooling。SML 是合法的 Python syntax subset,因此將 .sml files 與 Python 建立關聯,即可取得基本 syntax highlighting。在 VS Code 中使用下列設定。

"files.associations": {
  "*.sml": "python"
}