Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.3.11] - 2026-05-08

### Added
- Support for semantic token resolution to improve syntax highlighting (Community contribution from @Gustaf-C - Addresses [mathworks/MATLAB-extension-for-vscode#45](https://github.com/mathworks/MATLAB-extension-for-vscode/issues/45))

### Fixed
- Applied patches for CVE-2026-2950, CVE-2026-4800, CVE-2026-4867, CVE-2026-33228, CVE-2026-33671, CVE-2026-33672, and CVE-2026-39363

## [1.3.10] - 2026-04-02

### Fixed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ MATLAB language server implements several Language Server Protocol features and
* Symbol rename - [renameProvider](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_rename)
* Code folding - [foldingRangeProvider](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_foldingRange)
* Document highlights - [highlightSymbolProvider](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_documentHighlight)
* Semantic tokens - [semanticTokensProvider](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens)

## Clients
MATLAB language server supports these editors by installing the corresponding extension:
Expand Down
Binary file not shown.
9 changes: 9 additions & 0 deletions matlab/+matlabls/+project/closeProject.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function closeProject ()
% Closes the currently open MATLAB project

% Copyright 2026 The MathWorks, Inc.
proj = matlab.project.currentProject();
if ~isempty(proj)
close(proj);
end
end
6 changes: 6 additions & 0 deletions matlab/+matlabls/+project/newProject.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function newProject (projectName, projectPath)
% Creates a new MATLAB project with the specified name and path

% Copyright 2026 The MathWorks, Inc.
matlab.project.createProject("Name", projectName, "Folder", projectPath);
end
8 changes: 8 additions & 0 deletions matlab/+matlabls/+project/openProject.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function openProject (projectPath)
% Opens a MATLAB project from the specified path. The path can represent
% either a MATLAB project definition file (*.prj or matlab.toml), or a
% folder containing one.

% Copyright 2026 The MathWorks, Inc.
matlab.project.loadProject(projectPath);
end
5 changes: 5 additions & 0 deletions matlab/+matlabls/setupShadows.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function setupShadows(languageServerFolder)
addRestoreDefaultPathShadow(languageServerFolder);
addEditShadow(languageServerFolder);
addClcShadow(languageServerFolder);
addInputShadow(languageServerFolder);
catch ME
disp('Error while attempting to add shadow directories to path')
disp(ME.message)
Expand Down Expand Up @@ -43,3 +44,7 @@ function addClcShadow(languageServerFolder)
addpath(fullfile(languageServerFolder, 'shadows', 'clc'));
end
end

function addInputShadow(languageServerFolder)
addpath(fullfile(languageServerFolder, 'shadows', 'input'));
end
3 changes: 3 additions & 0 deletions matlab/initmatlabls.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ function initmatlabls (outFile)

% Shadow necessary functions
matlabls.setupShadows(folder);

% Initialize project event manager
matlabls.internal.project.ProjectEventManager.setupListeners();

try
% Disable specific settings which may cause editor windows to open
Expand Down
8 changes: 8 additions & 0 deletions matlab/shadows/input/input.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function out = input(varargin)
%INPUT Request user input

% Copyright 2026 The MathWorks, Inc.

matlabls.internal.CommunicationManager.publish('/matlabls/events/input', struct('promptString', varargin{1}));
out = builtin('input', varargin{:});
end
54 changes: 29 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matlab-language-server",
"version": "1.3.10",
"version": "1.3.11",
"description": "Language Server for MATLAB code",
"main": "./src/index.ts",
"bin": "./out/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/debug/MatlabDebugAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export default class MatlabDebugAdaptor {
async setBreakPointsRequest (response: DebugProtocol.SetBreakpointsResponse, args: DebugProtocol.SetBreakpointsArguments, request?: DebugProtocol.Request): Promise<void> {
const source = args.source as debug.Source;

if (source.path === undefined) {
if (source.path === undefined || !fs.existsSync(source.path)) {
this.sendResponse(response);
return;
}
Expand Down
64 changes: 33 additions & 31 deletions src/licensing/gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lifecycle/MatlabCommunicationManager.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/mvm/MVMServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default class MVMServer {
this._mvm.on(IMVM.Events.stateChange, this._handleMvmStateChange.bind(this))
this._mvm.on(IMVM.Events.output, this._handleOutput.bind(this));
this._mvm.on(IMVM.Events.clc, this._handleClc.bind(this));
this._mvm.on(IMVM.Events.inputPrompt, this._handleInputPrompt.bind(this));
this._mvm.on(IMVM.Events.promptChange, this._handlePromptChange.bind(this));
}

Expand Down Expand Up @@ -105,6 +106,10 @@ export default class MVMServer {
this._notificationService.sendNotification(Notification.MVMClc);
}

private _handleInputPrompt (promptString: string): void {
this._notificationService.sendNotification(Notification.MVMInputPrompt, promptString);
}

private _handlePromptChange (state: PromptState, isIdle: boolean): void {
this._notificationService.sendNotification(Notification.MVMPromptChange, {
state,
Expand Down
2 changes: 1 addition & 1 deletion src/mvm/impl/MVM.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/mvm/impl/MVMInterface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export declare namespace IMVM {
clc = "clc",
output = "output",
promptChange = "promptChange",
stateChange = "stateChange"
stateChange = "stateChange",
inputPrompt = "inputPrompt"
}
}
Loading
Loading