Any news about this feature request ?
If I remember correctly, at the most recent ICC Developer Panel, they were talking about exposing the underlying script files to the end user and then they could be opened in your favorite text editor. I may be way off here, I just remember something like that being said.
If I could use VS Code, Iâd be very happy
Thereâs an in-progress ticket to update the editor component and use it everywhere that a code editor is displayed but I donât know if it includes any of the improvements mentioned in the feature request.
@PGriffith might know more.
Paul has shared progress before. Maybe a sabbatical is in order to finish up? @PGriffith ?
Right now, updating the built-in editors is in progress (awaiting QA). Itâs far from complete, but it adds a lot of âsmartsâ to basic stuff. Some of what Iâd like to add will have to wait for 8.2, because of limitations in APIs such as third party scripting modules.
I would love to make the designer an LSP client, which would allow offloading a lot of tasks to external editors; but to do that weâd have to push designer-local resources to disk somewhere, and thereâs some tricky complications there.
Similar complications exist for pushing files to disk and opening in external editors; in addition, opening an external editor such as VS Code wouldnât work perfectly without some doing because: 1. you wouldnât have your project scripts in the right spots, and 2. you wouldnât have autocompletion for any system functions, and 3. you wouldnât have autocompletion for any Java libraries.
Doing that properly might require the designer acting as an LSP server, which is also a big task.
@PGriffith
IMHO, script editor most eagerly awaited reasonable improvements are as follow:
- Auto complete for user package
- function/block code folding
- generate comments for function/method (like in PyCharm)
- scope selector
- more color highlight (#TODO, âŠ)
- add multiselection for tag and property in script code windows, to insert a list of paths
The new script editing experience just got merged (to release in 8.1.18). Youâll be able to preview the changes in the next nightly build that goes out.
On Monday Iâll post a full thread detailing the changes.
In the meantime, some hype:
Yay! A bright spot for my first day back from vacation. /:
That looks awesome !
Looks great, will this work for custom libraries and functions as well?
Not in this first round of improvements (a lot of which was âbehind the scenesâ work to make things easier to improve down the road), but thatâs probably the next thing Iâll tackle.
Right now itâs somewhat improved system
function completions, completions for Pythonâs builtins, and much smarter contextual awareness of things like extension function arguments - plus, like I said, a lot of ground work to make future enhancements easier.
This would be one of the best scripting enhancements I can think about for the platform IMO. Building software tools using Ignition as a platform would become immensely easier and really help expand the communities capabilities into more software focused workflows.
It looks like CĂ©sar RomĂĄn has already addressed the following issues
- you wouldnât have your project scripts in the right spots, and 2. you wouldnât have autocompletion for any system functions, and 3. you wouldnât have autocompletion for any Java libraries.
with his ignition stubs project
I don't know that would go with break points etc
vscode can also be embedded in a modern web browser
so might be possible to embed vscode (or a tweaked vscode version) in chromium, in ignition, to provide a more 'integrated' experience
IMO, ignition scripters should be encouraged to write against stubs and mocks, along with a test suite. Then, use external version control with pipelines to perform automated testing.
Not sure if we got anywhere on this but I would also love to edit scripts directly through vscode. I tend to copy scripts over for quicker editing but sucks not having the intellisense for the ignition specific functions.
Rename Variable refactoring and a linter would be huge.
There is an Inductive Automation library available, I can't remember what it is called off the top of my head. You can run pip install if you find the package name on pypi.
You can import the packages for it at the top while working so that VSCode Intellisense works, and then delete those import lines from the top when you're done. That's what I've done in the past
I think it's called incendium.