ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Wolfram​Language

A Sublime Text package for Wolfram Language.

Details

Installs

  • Total 2K
  • Win 735
  • Mac 615
  • Linux 380
Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13
Windows 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 2
Mac 0 0 0 1 0 0 0 0 2 1 0 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 6 1
Linux 0 0 1 0 0 0 1 0 0 2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0

Readme

Source
raw.​githubusercontent.​com

Wolfram System Integration with Sublime Text

Official Sublime Text package for Wolfram Language

Forked from https://github.com/ViktorQvarfordt/Sublime-WolframLanguage

Thanks Viktor!

Features

  • Syntax Highlighting
  • Goto Definition
  • Auto complete
  • Diagnostics and suggestions for fixes
  • Formatting files and selections
  • Semantic highlighting
  • Expand and shrink selection
  • Outline
  • Color swatches
  • Symbol references
  • Documentation on hover

Syntax Highlighting

Support for the entire Wolfram Language syntax and all built-in functions.

highlighting

Setup

Compatible with Sublime Text 3 and Sublime Text 4.

If the LSP package (https://github.com/sublimelsp/LSP) is installed, then additional features will be available.

LSP functionality uses a Wolfram kernel to run as a language server.

This requires Wolfram System 12.1 or higher.

  1. Install Package Control
  2. Open Tools > Command Palette…
  3. Select Package Control: Install Package
  4. Install LSP
  5. Install WolframLanguage

The package must be installed from Wolfram Research.

The WolframLanguage package depends on LSPServer paclet to provide LSP functionality.

Install LSPServer paclet and its dependencies by running this Wolfram Language code:

PacletInstall["CodeParser"]
PacletInstall["CodeInspector"]
PacletInstall["CodeFormatter"]
PacletInstall["LSPServer"]

If properly setup, you should have syntax highlighting and linting of Wolfram Language .wl files.

Test this by typing this into a new .wl file and saving it:

Which[a, b, a, b]

You should see warnings about duplicate clauses.

Settings

If you have Wolfram System installed in the default location on your system, you may not have to change any settings.

If Wolfram System is not in the default location, then specify the actual location:

Go to the menu item: Package Settings > Wolfram Language > Settings

Add a kernel setting:

{
  …

  "kernel": "/Applications/Mathematica123.app/Contents/MacOS/WolframKernel"

  …
}

You may also change the command that is used to start the server:

{
  …

  "lsp_server_command":
    [
      "`kernel`",
      "-noinit",
      "-noprompt",
      "-nopaclet",
      "-noicon",
      "-nostartuppaclets",
      "-run",
      "Needs[\"LSPServer`\"];LSPServer`StartServer[]"
    ]

  …
}

Experimental Settings

You can enable experimental settings. These are not supported.

implicitTokens controls the display of implicit tokens such as Null after ; and implicit Times character ×.

{
  …

  "implicitTokens": ["*", ",", ";;", "?"]

  …
}

Troubleshooting

Troubleshooting LSP for Sublime Text

Make sure that LSPServer paclet and its dependencies are up-to-date and can be found on your system: “ PacletInstall["CodeParser”] PacletInstall[“CodeInspector”] PacletInstall[“CodeFormatter”] PacletInstall[“LSPServer”]

Needs[“LSPServer”]

### Server settings

Check `WolframLanguage.sublime-settings` for errors.

Turn on debug logging from the kernel by giving a string argument to `StartServer[]`.

This is a directory that kernel logs will be written to.

Needs[“LSPServer"];LSPServerStartServer[”/path/to/log/directory/“]