Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 8 additions & 25 deletions docs/introduction/ide-usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ Codegen creates a custom Python environment in `.codegen/.venv`. Configure your

<AccordionGroup>
<Accordion title="VSCode, Cursor and Windsurf" icon="window-maximize">
1. Open the Command Palette (Cmd/Ctrl + Shift + P)
2. Type "Python: Select Interpreter"
1. Install the VSCode Python Extensions for LSP and debugging support. We recommend Python, Pylance and Python Debugger for the best experience.
<img src="/images/python-extensions.png" />
2. Open the Command Palette (Cmd/Ctrl + Shift + P)
3. Type "Python: Select Interpreter"
<img src="/images/set-interpreter.png" />
3. Choose "Enter interpreter path"
4. Navigate to and select:
4. Choose "Enter interpreter path"
5. Navigate to and select:
```bash
.codegen/.venv/bin/python
```
Expand All @@ -29,13 +31,10 @@ Codegen creates a custom Python environment in `.codegen/.venv`. Configure your
{
"python.defaultInterpreterPath": "${workspaceFolder}/.codegen/.venv/bin/python",
"python.analysis.extraPaths": [
"${workspaceFolder}/.codegen/.venv/lib/python3.11/site-packages"
"${workspaceFolder}/.codegen/.venv/lib/python3.12/site-packages"
]
}
```

5. Install the VSCode Python Extensions for LSP and debugging support. We recommend Python, Pylance and Python Debugger for the best experience.
<img src="/images/python-extensions.png" />
</Accordion>

<Accordion title="PyCharm" icon="python">
Expand All @@ -47,24 +46,8 @@ Codegen creates a custom Python environment in `.codegen/.venv`. Configure your
```bash
.codegen/.venv/bin/python
```

For better type hints:
1. Right-click on `.codegen/.venv`
2. Mark Directory as > Sources Root
</Accordion>

<Accordion title="Troubleshooting" icon="wrench">
Common issues and solutions:

- **Missing Completions**: Make sure the interpreter is correctly set and the environment has `codegen` installed
- **Import Errors**: Verify the environment is activated and Python path includes the virtual environment
- **Wrong Python Version**: Check that you're using Python 3.11 or higher in `.codegen/.venv`

Run this to verify your environment:
```bash
.codegen/.venv/bin/python -c "import codegen; print(codegen.__version__)"
```
</Accordion>

</AccordionGroup>


Expand Down
30 changes: 15 additions & 15 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
"default": "dark"
},
"metadata": {
"og:site_name": "Codegen",
"og:title": "Codegen - Manipulate code at scale",
"og:description": "A scriptable interface to a powerful, multi-lingual language server built on top of Tree-sitter.",
"og:url": "https://codegen.com",
"og:image": "https://mintlify.s3.us-west-1.amazonaws.com/codegeninc/images/codegen.jpeg",
"og:locale": "en_US",
"og:logo": "https://mintlify.s3.us-west-1.amazonaws.com/codegeninc/images/codegen-thumbnail.png",
"article:publisher": "Codegen, Inc.",
"twitter:title": "Codegen - Manipulate code at scale",
"twitter:description": "A scriptable interface to a powerful, multi-lingual language server built on top of Tree-sitter.",
"twitter:url": "https://codegen.com",
"twitter:image": "https://mintlify.s3.us-west-1.amazonaws.com/codegeninc/images/codegen.jpeg",
"twitter:site": "@codegen",
"og:image:width": "2400",
"og:image:height": "1200"
"og:site_name": "Codegen",
"og:title": "Codegen - Manipulate code at scale",
"og:description": "A scriptable interface to a powerful, multi-lingual language server built on top of Tree-sitter.",
"og:url": "https://codegen.com",
"og:image": "https://mintlify.s3.us-west-1.amazonaws.com/codegeninc/images/codegen.jpeg",
"og:locale": "en_US",
"og:logo": "https://mintlify.s3.us-west-1.amazonaws.com/codegeninc/images/codegen-thumbnail.png",
"article:publisher": "Codegen, Inc.",
"twitter:title": "Codegen - Manipulate code at scale",
"twitter:description": "A scriptable interface to a powerful, multi-lingual language server built on top of Tree-sitter.",
"twitter:url": "https://codegen.com",
"twitter:image": "https://mintlify.s3.us-west-1.amazonaws.com/codegeninc/images/codegen.jpeg",
"twitter:site": "@codegen",
"og:image:width": "2400",
"og:image:height": "1200"
},
"favicon": "/favicon.svg",
"colors": {
Expand Down