Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ website:
- remote-ssh.qmd
- updating.qmd
- extension-development.qmd
- folder-templates.qmd
- section: "Migrating from RStudio"
contents:
- rstudio-keybindings.qmd
Expand Down
51 changes: 51 additions & 0 deletions folder-templates.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: "Folder Templates"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we like this title but I wanted to keep it generic for when we eventually add more templates (built-in or even user supported). Not in love with this title so I'm open to ideas.

The doc feels a little incomplete to me but I can't figure out what's missing...

---

## New folder from template

The "New Folder from Template" feature helps you quickly setup a a folder with an environment using a predefined template for a language or framework.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overview of why you would want to use the template feature feels a little light to me. Is there anything else worth mentioning here?


To create a new folder from one of the available templates in Positron, select the "New" dropdown menu in the top-left or the workspace switcher in the top-right. Select the "New Folder from Template" option to bring up the dialog.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mention the workspace switcher here and we'll want to link out to the workspace switcher section in the ui interface doc.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also include the command Workspaces: New Folder from Template... here as well?


### Select a template

When you open the **New Folder from Template** dialog, you will see a list of available templates.

Choose a template that best matches the language or framework for the work you are doing. The "Empty Project" option allows you to create a blank folder with no additional files or configuration.

After you select a template, enter a name for your new folder and choose a location on your system. You can check the **Initialize Git repository** box if you want to create a Git repository in the new folder. Select **Next** to continue to template-specific configuration options.

### Python templates

When you select a Python template, the dialog guides you through setting up your Python environment. This ensures your project starts with the right tools and interpreter for your work.

**How would you like to set up your Python environment?:**
- **Create a new virtual environment:** Recommended for most users. This option creates an isolated environment for your project, which helps avoid conflicts with other Python projects on your system.
- **Use an existing environment:** Choose this if you already have a Python environment you want to use.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need an empty line before the bullets to avoid this rendering issue here and a few more spots below where bulleted lists are used:

image
Suggested change
**How would you like to set up your Python environment?:**
- **Create a new virtual environment:** Recommended for most users. This option creates an isolated environment for your project, which helps avoid conflicts with other Python projects on your system.
- **Use an existing environment:** Choose this if you already have a Python environment you want to use.
**How would you like to set up your Python environment?:**
- **Create a new virtual environment:** Recommended for most users. This option creates an isolated environment for your project, which helps avoid conflicts with other Python projects on your system.
- **Use an existing environment:** Choose this if you already have a Python environment you want to use.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching that! I think I might revisit the format of this section generally


**Environment Creation:**
Select a tool such as `venv`, `conda`, or `uv` to create your new environment. See the [Supported environment managers guide](python-installations.qmd#supported-environment-managers) to learn about which managers are supported.

**Python Interpreter:**
- Choose the version of Python you want to use. If you do not see the version you need, see the [Discovering Python Installations guide](python-installations.qmd) for help adding new interpreters and details about how Positron discovers and manages Python environments.


### R templates

When you select an R template, the dialog helps you configure your R environment for the new project.

**R Version:**
- Select the version of R you want to use. If the version you need is not listed, see the [Discovering R Installations guide](r-installations.qmd) for help adding new R versions and details about how Positron discovers R versions.


**Advanced configuration:**
- You can check the **Use `renv` to create a reproducible environment** box to initialize your folder with `renv`.

`renv` is an R package that helps you manage project dependencies. It creates a snapshot of the R packages in your project and saves them in a `renv.lock` file. This makes it easy to share your project with other people or computers. Using `renv` helps you avoid problems caused by package updates or differences between computers. It ensures your project always uses the correct package versions, making it reliable and reproducible. This is especially helpful when collaborating with others or working on long-term projects.

To learn more about `renv`, see the [Introduction to renv guide](https://rstudio.github.io/renv/articles/renv.html).

### Finish

Once you are satisfied with your configuration options, select **Create** to create your new folder with the applied settings. Positron creates the folder and applies your selected template and settings. Once setup is complete, you will be prompted open the folder in the current window or a new window to begin working.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also note that Positron will start up the chosen interpreter automatically?

2 changes: 1 addition & 1 deletion python-installations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You can create new Python environments directly from Positron using the _Python:

The environment will be created in your workspace and automatically discovered.

You can also use the **New Folder From Template** feature to create a new Python project, and set up an environment as part of the project.
You can also use the [New Folder From Template feature](folder-templates.qmd#new-folder-from-template) to create a new Python project, and set up an environment as part of the project.

### Discovering existing environments

Expand Down