Igor Pro Extension for Visual Studio Code
The extension helps you editing Igor procedure files (*.ipf
).
The author of this extension is just a Igor Pro user and has no more relation with Wavemetrics, Inc., which develops Igor Pro itself.
Use GitHub Issues for bug reports and feature requests about this extension.
The textual contents of the IntelliSense code hints are cited from the official manual (manual revision: June 24, 2022 (9.01)) and the in-app command helps (application version: 9.01 (Build 39200)).
Features
- Diagnostics - syntax check
- Basic linguistic support for editing - comment toggling, indentation adjustment, etc.
- Syntax highlighting - colorizing symbols using a grammar
- Code completion and hinting - also called IntelliSense
- Hovers
- Code completion proposals - autocompletion that works during a user types a symbol
- Code snippets - templates that make it easier to enter repeating code patterns, such as loops and conditional-statements
- Help with function signatures - help that appears during a user types an argument in a function call
- Code navigation
- Symbol navigation in a document - available at Go to Symbol in Editor (Ctrl+Shift+O) menubar item and the navigation bar at the top the editor pane (aka breadcrumbs)
- Symbol navigation in workspaces - available via Go to Symbol in Workspace (Ctrl+T)
- Show definitions of a symbol - available via Go to Definition (F12) and Peek Definition (Alt+F12)
- Links - link to a file specified in
#include
statements.
- Commands - the following commands can be invoked from the command pallate (Ctrl+Shit+P):
- "Show Built-in Symbols"
- "Show Workspace Symbols (JSON)": exported file can be used for importing the symbols in another workspace, with "vscode-igorpro.suggest.symbolFile" setting.
The extension uses the following symbols for the IntelliSSense features:
- local variables in the active editor
- global constants, structure, macros, and functions in workspaces
- built-in keywords, functions and operations
- (optional) symbols defined in a file whose path is specified in "vscode-igorpro.suggest.symbolFile" setting.
See issue #59.
Known Issues
See GitHub Issues.
The current syntax parser is far from perfect.
If you find any problems, report it on GitHub Issues.
Code Helps not complete
Code hinting database currently lacks descriptive messages of most symbols (See Issue #1).
Contribution to the point is very welcome.
Limitations of Diagnostics
In Igor Pro, several Operations such as FuncFit
and MatrixOp
have a special grammar that is different from the basic syntax used for arithmetic calculation, etc.
To avoid lines of such an Operation being listed in "Problems" view of VS Code, currently the parser simply skips strict syntax check when the line starts with a built-in Operation name.
Contributing
The extension is open to contributions. Create an issue in GitHub Issues for a bug report or a feature request. If you want to contribute code, please read CONTRIBUTING.md.