Skip to content

Commit 9310d17

Browse files
Merge branch 'master' into add-ipynb
2 parents 11b1a1d + 689afcd commit 9310d17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+12192
-3761
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.11.0

.vscodeignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
.vscode/**
22
.vscode-test/**
3+
out/test/**
34
src/**
45
.gitignore
56
.yarnrc
7+
.nvmrc
68
vsc-extension-quickstart.md
79
**/tsconfig.json
810
**/.eslintrc.json
911
**/*.map
1012
**/*.ts
11-
node_modules/**
1213
build/**
14+
scripts/**
15+
.vsix

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11

2-
## v1.9.0 - XX Dec, 2022
2+
## v2.0.0 - XX Nov, 2024
3+
4+
Add themes.
5+
6+
Add VsCode notebook support.
7+
8+
Add auto-completion support.
9+
10+
Add `Start Wolfram in terminal` command.
311

412

513
## v1.8.0 - 10 Oct, 2022

CMakeLists.txt

Lines changed: 0 additions & 166 deletions
This file was deleted.
File renamed without changes.

Docs/configuration-details.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Configuration Details
2+
3+
## Kernel management
4+
5+
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.
6+
7+
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.
8+
9+
LSP functionality runs in its own kernel, separate from evaluations done in notebooks or in the terminal window.
10+
11+
## Supported features
12+
13+
* Syntax Highlighting
14+
* Diagnostics and suggestions for fixes
15+
* Formatting files and selections
16+
* Semantic highlighting
17+
* Expand and shrink selection
18+
* Outline
19+
* Color swatches
20+
* Symbol references
21+
* Function definition and documentation on hover
22+
* Completion support
23+
* VSCode Notebook support
24+
* Running Wolfram Language code in Wolfram terminal
25+
* New menu items (Open in System Editor)
26+
27+
## Settings
28+
29+
You can change many settings for custom kernel management and user experience.
30+
31+
### Changing settings
32+
Open the Command Palette
33+
34+
Choose the command:
35+
`Wolfram Language: Open Configurations`
36+
37+
![open-config](../Docs/feature/open-config.png)
38+
39+
A settings window will open:
40+
41+
### Visualization settings
42+
Visualization or rendering related settings can be modified from VSCode settings
43+
44+
#### Graphics scaling
45+
46+
Rendered image size in the notebook can be rescaled using `Wolfram › Rendering: Image Scaling Factor`:
47+
48+
![graphics-scaling](../Docs/visualization/graphics-scaling.png)
49+
50+
#### Invert output in dark themes
51+
Rendered image background color can be inverted using `Wolfram › Rendering: Invert Brightness In Dark Themes`:
52+
53+
![invert-theme](../Docs/visualization/invert-theme.png)
54+
55+
### Other Settings
56+
57+
It is convenient to remove `$` as a word separator, because it is a letterlike character in Wolfram Language.
58+
59+
It is also convenient to add `_` as a word separator, because it is NOT a letterlike character in Wolfram Language.
60+
```
61+
"editor.wordSeparators": "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?_"
62+
```
63+
64+
65+
66+
### Extension quick test
67+
68+
#### LSP functionality
69+
70+
Many features of this extension use Microsoft's Language Server Protocol (LSP). LSP functionality requires version 12.1 or later of the Wolfram system.
71+
72+
If properly set up, syntax highlighting and linting of Wolfram Language `.wl` files should be visible.
73+
74+
Test this by typing this into a new `.wl` file and saving it:
75+
```
76+
Which[a, b, a, b]
77+
```
78+
79+
Warnings about duplicate clauses should be seen.
80+
81+
82+
#### Notebook functionality
83+
84+
Create a new file with the `.vsnb` extension. Open the file and notebook input cells should be visible.
85+
86+
Any valid Wolfram Language expression can be evaluated in this notebook.
87+
88+
##### Notebook kernel usage
89+
90+
91+
* All notebooks in a single VSCode instance use the same Wolfram kernel.
92+
* Each instance of VSCode uses a different Wolfram kernel.
93+
94+
95+
## Troubleshooting
96+
97+
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.

Docs/feature/completion-support.gif

643 KB
Loading

Docs/feature/hover-support.gif

364 KB
Loading

Docs/feature/open-config.png

5.33 KB
Loading

Docs/highlighting.png

69.6 KB
Loading

Docs/install/install-extension.png

35.1 KB
Loading

Docs/notebook-output.png

152 KB
Loading

Docs/settings.png

93 KB
Loading
File renamed without changes.

Docs/themes/dark-theme.png

60 KB
Loading

Docs/themes/light-theme.png

39.5 KB
Loading
9.35 KB
Loading

Docs/visualization/invert-theme.png

16.9 KB
Loading

HowToBuild.md

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# Building
22

3-
VSCode-Wolfram uses a Wolfram Language kernel to build a `.vsix` file.
4-
5-
VSCode-Wolfram uses CMake to generate build scripts.
6-
7-
## One time setup
8-
93
npm must be installed on your system. Get npm from here:
104
[Get npm](https://www.npmjs.com/get-npm)
115

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

1812
## Building
1913

20-
Here is an example transcript using the default make generator to build VSCode-Wolfram:
21-
22-
```
23-
cd vscode-wolfram
24-
mkdir build
25-
cd build
26-
cmake ..
27-
cmake --build .
28-
```
29-
30-
The result is a `.vsix` file in the `build` directory.
31-
32-
Specify `MATHEMATICA_INSTALL_DIR` if you have Mathematica installed in a non-default location:
14+
Here is an example transcript using the default npm and vsce to build VSCode-Wolfram:
3315

3416
```
35-
cmake -DMATHEMATICA_INSTALL_DIR=/Applications/Mathematica.app/Contents/ ..
36-
cmake --build .
17+
npm install
18+
vace package
3719
```
3820

39-
On Windows:
40-
41-
```
42-
cmake -DMATHEMATICA_INSTALL_DIR="C:/Program Files/Wolfram Research/Mathematica/13.1" ..
43-
cmake --build .
44-
```
21+
The result is a `.vsix` file in the project directory.
4522

4623
## Installing
4724

48-
You can install the paclet from CMake:
25+
You can install the built extension from command-line terminal in VsCode:
4926
```
50-
cmake --install .
27+
code --install-extension vsixFilePath
5128
```
52-
53-
This runs the `vsce` command and installs the built `.vsix` file.

0 commit comments

Comments
 (0)