Visual Studio Code Client for Wolfram Language Server
by kenkangxgwe and hxianglong
Table of Contents
Please be advised to git pull the lastest version, which has been released on 02/05/2019.
Wolfram Language Server (WLServer) is an implementation of the Microsoft's
Language Server Protocol
(LSP) for Wolfram
Language. This server is
implemented in Wolfram Language itself.
This is the client-side code for VS Code, which is based on some slight
modifications of Microsoft's LSP
However, you still need to manually install the
Wolfram Mathematica (11.2 or higher1).
Download the server from its
git clone https://github.com/kenkangxgwe/lsp-wl.git
- Install the client extenstion from Visual Studio Marketplace: Wolfram
Once you have installed the extension, a few settings have to be done manually
in the client side to make things work.
After the extension is launched, go to Preference -> Settings -> User Settings
-> Extensions -> Wolfram Language Server, and configure the following options:
Port: The client communicates with the server through port. Feel free to use
any port that is not occupied by other processes.
WLServer Path: The path to the server repository.
Wolfram Path: The path of the
Wolfram executable. (NOT
For Windows users, the default path is
C:\Program Files\Wolfram Research\Mathematica\11.*\wolfram.exe.
For MaxOS users, the default path is
For Linux users, the default path is
Restart VS Code to take effect.
- Hover: Provide definitions for Wolfram functions and system variables, such
Completion: The completion is triggered by the client automatically.
Currently, Wolfram functions and system variables would be displayed.
Completion Resolve: Further information would be provided for the items in
- Diagnostics: Syntax error would be underlined. However, the specific syntax
error is not supported at the moment.
This is an early release, so more features are on the way. Syntax highlight is
NOT supported according to the design of LSP, but there are already some good
enough extensions like Wolfram
SocketListen is used for server-client
communication, which is introduced since 11.2. We plan to support stdio for
better compatibility ^