Skip to content

Commit

Permalink
Merge branch 'master' into add-ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
asukaminato0721 committed Dec 4, 2024
2 parents 11b1a1d + 689afcd commit 9310d17
Show file tree
Hide file tree
Showing 68 changed files with 12,192 additions and 3,761 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.11.0
5 changes: 4 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
.vscode/**
.vscode-test/**
out/test/**
src/**
.gitignore
.yarnrc
.nvmrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
node_modules/**
build/**
scripts/**
.vsix
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@

## v1.9.0 - XX Dec, 2022
## v2.0.0 - XX Nov, 2024

Add themes.

Add VsCode notebook support.

Add auto-completion support.

Add `Start Wolfram in terminal` command.


## v1.8.0 - 10 Oct, 2022
Expand Down
166 changes: 0 additions & 166 deletions CMakeLists.txt

This file was deleted.

File renamed without changes.
97 changes: 97 additions & 0 deletions Docs/configuration-details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Configuration Details

## Kernel management

If you have the Wolfram System (either Wolfram, Mathematica, or Wolfram Engine) installed in the default location on your system, you may not have to change any kernel settings.

By default, the extension tries to find the most recent version of the Wolfram system in standard locations, but if it cannot be found or you want to specify a kernel to use, edit the `Wolfram: System Kernel` setting to give the full path to the WolframKernel executable.

LSP functionality runs in its own kernel, separate from evaluations done in notebooks or in the terminal window.

## Supported features

* Syntax Highlighting
* Diagnostics and suggestions for fixes
* Formatting files and selections
* Semantic highlighting
* Expand and shrink selection
* Outline
* Color swatches
* Symbol references
* Function definition and documentation on hover
* Completion support
* VSCode Notebook support
* Running Wolfram Language code in Wolfram terminal
* New menu items (Open in System Editor)

## Settings

You can change many settings for custom kernel management and user experience.

### Changing settings
Open the Command Palette

Choose the command:
`Wolfram Language: Open Configurations`

![open-config](../Docs/feature/open-config.png)

A settings window will open:

### Visualization settings
Visualization or rendering related settings can be modified from VSCode settings

#### Graphics scaling

Rendered image size in the notebook can be rescaled using `Wolfram › Rendering: Image Scaling Factor`:

![graphics-scaling](../Docs/visualization/graphics-scaling.png)

#### Invert output in dark themes
Rendered image background color can be inverted using `Wolfram › Rendering: Invert Brightness In Dark Themes`:

![invert-theme](../Docs/visualization/invert-theme.png)

### Other Settings

It is convenient to remove `$` as a word separator, because it is a letterlike character in Wolfram Language.

It is also convenient to add `_` as a word separator, because it is NOT a letterlike character in Wolfram Language.
```
"editor.wordSeparators": "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?_"
```



### Extension quick test

#### LSP functionality

Many features of this extension use Microsoft's Language Server Protocol (LSP). LSP functionality requires version 12.1 or later of the Wolfram system.

If properly set up, syntax highlighting and linting of Wolfram Language `.wl` files should be visible.

Test this by typing this into a new `.wl` file and saving it:
```
Which[a, b, a, b]
```

Warnings about duplicate clauses should be seen.


#### Notebook functionality

Create a new file with the `.vsnb` extension. Open the file and notebook input cells should be visible.

Any valid Wolfram Language expression can be evaluated in this notebook.

##### Notebook kernel usage


* All notebooks in a single VSCode instance use the same Wolfram kernel.
* Each instance of VSCode uses a different Wolfram kernel.


## Troubleshooting

If the kernel cannot start, then check the Output view and open the Wolfram Language Error Report output channel for more information.
File renamed without changes
Binary file added Docs/feature/completion-support.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/feature/hover-support.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/feature/open-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/highlighting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/install/install-extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/notebook-output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added Docs/themes/dark-theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/themes/light-theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/visualization/graphics-scaling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Docs/visualization/invert-theme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 6 additions & 31 deletions HowToBuild.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# Building

VSCode-Wolfram uses a Wolfram Language kernel to build a `.vsix` file.

VSCode-Wolfram uses CMake to generate build scripts.

## One time setup

npm must be installed on your system. Get npm from here:
[Get npm](https://www.npmjs.com/get-npm)

Expand All @@ -17,37 +11,18 @@ npm install -g vsce

## Building

Here is an example transcript using the default make generator to build VSCode-Wolfram:

```
cd vscode-wolfram
mkdir build
cd build
cmake ..
cmake --build .
```

The result is a `.vsix` file in the `build` directory.

Specify `MATHEMATICA_INSTALL_DIR` if you have Mathematica installed in a non-default location:
Here is an example transcript using the default npm and vsce to build VSCode-Wolfram:

```
cmake -DMATHEMATICA_INSTALL_DIR=/Applications/Mathematica.app/Contents/ ..
cmake --build .
npm install
vace package
```

On Windows:

```
cmake -DMATHEMATICA_INSTALL_DIR="C:/Program Files/Wolfram Research/Mathematica/13.1" ..
cmake --build .
```
The result is a `.vsix` file in the project directory.

## Installing

You can install the paclet from CMake:
You can install the built extension from command-line terminal in VsCode:
```
cmake --install .
code --install-extension vsixFilePath
```

This runs the `vsce` command and installs the built `.vsix` file.
Loading

0 comments on commit 9310d17

Please sign in to comment.