MATLAB Lint

Hover over any MATLAB built-in function in VS Code and instantly see its description, syntax, input arguments, output arguments, and a direct link to the official MathWorks documentation.

Features
- Instant hover tooltips — rich Markdown popups with syntax-highlighted code blocks
- 265+ built-in functions bundled out of the box (fft, plot, eig, imread, ...)
- 3-tier cascading lookup — if the local database doesn't have it, the extension falls back automatically:
- Local DB — bundled JSON, instant, works offline
- MATLAB Help — runs
matlab -batch "help func" (only if MATLAB is installed)
- Web Docs — fetches and parses the live MathWorks documentation page
- Self-learning database — any function resolved via MATLAB Help or Web Docs is automatically saved into the local database for instant lookups next time
- Configurable provider order — enable/disable each tier and reorder them
- In-memory LRU cache — repeated hovers are instant within a session
- Direct doc links — every tooltip includes a clickable link to the official MathWorks reference page
Getting Started
- Install the extension from the VS Code Marketplace
- Open any
.m or .mlx file
- Hover over a function name — the tooltip appears automatically
No configuration needed. It works out of the box.
How It Works
Hover on "fft" in your .m file
|
v
+-----------+ miss +---------------+ miss +----------+
| Local DB | -----------> | MATLAB Help | -----------> | Web Docs |
| (bundled) | | (matlab -batch)| | (HTTPS) |
+-----------+ +---------------+ +----------+
| | |
v v v
Instant result Parsed CLI output Parsed HTML
| | |
+--------+ result +------+-----+ result +------------+
| | | |
v v v v
+--------------------------------------+
| Rich Markdown Hover Tooltip |
+--------------------------------------+
| Also saved to Local DB for next time |
+--------------------------------------+
Extension Settings
All settings are under matlabLint.* in your VS Code settings:
| Setting |
Type |
Default |
Description |
enableLocalDB |
boolean |
true |
Use the bundled local function database |
enableMatlabHelp |
boolean |
true |
Use matlab -batch for lookups (requires MATLAB) |
enableWebLookup |
boolean |
true |
Fetch docs from the MathWorks website |
matlabPath |
string |
"matlab" |
Path to the MATLAB executable |
webLookupTimeout |
number |
5000 |
Timeout in ms for web fetches |
cacheResults |
boolean |
true |
Cache results in memory during the session |
lookupOrder |
array |
["localDB","matlabHelp","web"] |
Priority order of lookup sources |
Commands
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type:
| Command |
Description |
MATLAB Lint: Clear Lookup Cache |
Clears the in-memory cache |
MATLAB Lint: Open MathWorks Docs for Function |
Opens the MathWorks doc page for the function under cursor |
MATLAB Lint: Refresh Function Database |
Reloads the local JSON database from disk |
Requirements
- VS Code 1.85 or later
- No other dependencies required — the extension works out of the box with its bundled database
- Optional: MATLAB installed locally (for Tier 2
matlab -batch lookups)
- Optional: Internet connection (for Tier 3 web documentation lookups)
FAQ
Q: Does this work without MATLAB installed?
Yes. The bundled local database covers 265+ common functions. Web lookup covers everything else. MATLAB is only needed for the Tier 2 provider, which is skipped automatically if MATLAB isn't found.
Q: How do I add more functions to the local database?
Just hover over them! If the function is found via MATLAB Help or Web Docs, it's automatically persisted to your local database for instant lookups next time.
Q: Does this work with Simulink / toolbox functions?
The bundled database focuses on core MATLAB functions. However, Tier 2 (MATLAB Help) covers any installed toolbox function, and Tier 3 (Web Docs) can resolve most documented MathWorks functions. Once resolved, they're saved locally.
Q: Can I use this alongside the official MATLAB extension?
Yes. This extension only provides hover tooltips and does not conflict with syntax highlighting, debugging, or other features from other MATLAB extensions.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Development Setup
git clone https://github.com/vheckthor/matlab-lint.git
cd matlab-lint
npm install
npm run compile
Press F5 in VS Code to launch the Extension Development Host for testing.
License
MIT