Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed Nov 7, 2021
1 parent b5d3272 commit ae63cf8
Show file tree
Hide file tree
Showing 21 changed files with 33 additions and 162 deletions.
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "~0.24"
Documenter = "~0.27"
15 changes: 9 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
using Documenter

# download latest changelog
download("https://raw.githubusercontent.com/julia-vscode/julia-vscode/master/CHANGELOG.md", joinpath(@__DIR__, "src", "changelog.md"))

makedocs(
sitename = "Julia in VS Code",
pages = [
"Home" => "index.md",
# "Setup" => "setup.md", #
# "Setup" => "setup.md",
"Getting Started" => "gettingstarted.md",
"User Guide" => Any[
"Running Code" => "userguide/runningcode.md",
Expand All @@ -23,14 +26,14 @@ makedocs(
"Remote Development" => "userguide/remote.md",
"Settings" => "userguide/settings.md"
],
"What's New" => Any[
"Version v0.17" => "release-notes/v0_17.md",
"Version v0.16" => "release-notes/v0_16.md"
],
"Change Log" => "changelog.md",
"Developer Documentation" => Any[
"Overview" => "devdocs/devdocs.md"
]
]
],
format = Documenter.HTML(
prettyurls = ("CI" in keys(ENV))
)
)

deploydocs(
Expand Down
1 change: 1 addition & 0 deletions docs/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
changelog.md
Binary file removed docs/src/release-notes/0.16/inline_exec.png
Binary file not shown.
Binary file removed docs/src/release-notes/0.16/module_eval.png
Binary file not shown.
Binary file removed docs/src/release-notes/0.16/workspace.png
Binary file not shown.
Binary file removed docs/src/release-notes/0.17/debugger_globals.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/src/release-notes/0.17/inline_bubbles_dark.png
Binary file not shown.
Binary file removed docs/src/release-notes/0.17/inline_bubbles_light.png
Binary file not shown.
Binary file removed docs/src/release-notes/0.17/profiler_figure.png
Binary file not shown.
Binary file removed docs/src/release-notes/0.17/profiler_table.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/src/release-notes/0.17/stackframe_buttons.png
Binary file not shown.
Binary file not shown.
Binary file removed docs/src/release-notes/0.17/stackframe_hover.png
Binary file not shown.
49 changes: 0 additions & 49 deletions docs/src/release-notes/v0_16.md

This file was deleted.

85 changes: 0 additions & 85 deletions docs/src/release-notes/v0_17.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/src/userguide/formatter.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Formatting Code

Code formatting is powered by [JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl). Both the `Format Document` command (`Ctrl-Shift-I`) and `Format Selection` (`Ctrl-K Ctrl-F`) are supported.

The default formatting is fairly conservative and unintrusive, but you can customise it with a `.JuliaFormatter.toml`. Check out the [relevant documentation here](https://domluna.github.io/JuliaFormatter.jl/stable/).
35 changes: 14 additions & 21 deletions docs/src/userguide/runningcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The VS Code command `Run: Start Without Debugging` (Ctrl+F5) by default starts a

**Note** that the Julia instance that is started by this command is entirely independent from the Julia REPL that the extension also supports.

You can easily customize the behavior of `Run: Start Without Debugging` by creating a [launch configuration](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations). In many situations it is beneficial to not run the currently active file, but instead configure one file in your workspace as the main entry point for your project that is run when you press Ctrl+F5.
You can easily customize the behavior of `Run: Start Without Debugging` by creating a [launch configuration](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations). In many situations it is beneficial to not run the currently active file, but instead configure one file in your workspace as the main entry point for your project that is run when you press Ctrl+F5.

Other customization options include *custom working directories*, *command line arguments* or a *specific Julia environment* (that is distinct from the active Julia environment in the VS Code window). Launch configurations also allow you to configure more complex execution scenarios where multiple Julia and non-Julia scripts are started simultaneously via [compound launch configurations](https://code.visualstudio.com/docs/editor/debugging#_compound-launch-configurations).

Expand All @@ -29,38 +29,31 @@ The REPL that is started with the `Julia: Start REPL` command will have the root

## Running code in the Julia REPL

There are four commands that you can use to run code from your editor in the Julia REPL:
There are four commands that you can use to run code from your editor in the Julia REPL:

- `Julia: Execute Code` (Ctrl+Enter)
- `Julia: Execute Code Block` (Alt+Enter)
- `Julia: Execute Code Cell` (Shift+Enter)
- `Julia: Execute File`
- `Julia: Execute Code in REPL`
- `Julia: Execute Code Cell in REPL`
- `Julia: Execute File in REPL`
- `Julia: Run File in New Process`

### Julia: Execute Code (Ctrl+Enter)

This command will either send the text that is currently selected in the active editor to the Julia REPL, or it will send the entire line where the cursor is currently positioned when no text is selected. In the latter case it will also advance the cursor to the next line of code.

This command works a little bit like copy-paste: it will literally just copy some code from the editor into the REPL as if that code was typed in the REPL. This design has some consequences that you should keep in mind:
- When you send something, like a function definition to the REPL, no line or file information will be associated with that function. This can be annoying later on, when exceptions that are thrown in this function will not show any location information.
- `include` statements will always try to load relative paths relative to the current working directory, not relative to the file from which they are executed.
- Macros like `@__DIR__` and `@__FILE__` do not work properly.

Due to these limitations, most users should use the `Julia: Execute Code Block` command in most cases.

### Julia: Execute Code Block (Alt+Enter)
### Julia: Execute Code in REPL

Whenever, there is some Julia code selected in the currently active editor, this command will execute the selected code. If no text is selected, the command will identify the extent of the top-level language construct that the cursor is located in (except modules) and execute that code block.

This command uses a different execution model than `Julia: Execute Code` that provides a more robust experience. In particular, it will associate location information with code that is executed, `include` will work correctly with relative paths and macros like `@__DIR__` and `@__FILE__` work as expected.
This command will associate location information with code that is executed, `include` will work correctly with relative paths and macros like `@__DIR__` and `@__FILE__` work as expected.

For most users, this should be their default command to run Julia code in the REPL.

### Julia: Execute Code Cell (Shift+Enter)
### Julia: Execute Code Cell in REPL

The extension provides support for demarking code cells in standard Julia files with a specially formatted comment: `##`. This command will identify in which code cell the cursor in the active editor currently is and then execute the code in that cell. If there are no code cells used in the current file, it will execute the entire file.

This command uses the same code execution techniques as the `Julia: Execute Code Block` command. Include statements, location information etc. all work as expected, that is run with this command.

### Julia: Execute File
### Julia: Execute File in REPL

This command runs the entire content of the currently active file in the Julia REPL. It uses the same code execution techniques as the `Julia: Execute Code Block` command. Include statements, location information etc. all work as expected, that is run with this command.

### Julia: Run File in New Process

Sometimes it's desirable to run your code in a new process (e.g. if you want to be absolutely sure that no state from previosuly run code interferes), so this command will spawn a new Julia process and run the active file in it.
4 changes: 4 additions & 0 deletions docs/src/userguide/weave.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Julia Markdown Documents

The extension supports Weave markdown documents with the `.jmd` extension. All Julia code evaluation keybindings and commands should work normally, but cells are defined as fenced Julia code blocks instead (the usual `##` delimiter has no meaning here).

The `Julia Weave: Open Preview` command to weave the current file to a temporary HTML document, which will then be displayed in the editor. `Julia Weave: Save to File...` allows you to select the output format and will save the weaved document next to the source file.

0 comments on commit ae63cf8

Please sign in to comment.