Visual Studio Code supports P1 development on Windows, Mac, Linux (yes, RPi)
NEWS
Version v1.8.6 is the current release version but as of earlier version v1.7.0, this extension fully supports P1 as well as P2 spin/pasm development.
Features:
- Full support for both P1 (spin/pasm) and P2 (spin2/pasm2) languages
- Syntax and Semantic Highlighting for both Spin and Pasm
- Syntax and Semantic Highlighting for both Spin2 and Pasm2 including all Streamer and Smart-pin Symbols as well as all debug() statements with parameter validation for all display types
- Custom tabbing Tab-stop support per section à la Parallax Propeller Tool
- Tab Sets You can choose between Propeller Tool, IronSheep, and User1 (adjust in settings to make your favorite set)
- File navigation from Outline View
- Edit Mode support à la Parallax Propeller Tool [Insert, Overtype and Align]
- Works with your favorite VSCode themes
- Offers companion Theme (Two themes: Syntax+Semantic, and Syntax only - mostly used during semantic highlighting development)
Known Issues:
We haven't yet learned how to control the ending position of the edit cursor. So in many cases when using selection not an insert point the cursor may end up not being where you might expect it to be after pressing TAB or Shift+TAB. We are looking into how to solve this. Even tho' this problem exists the formatting ability this new service provides is well worth this minor headache. We will keep looking for a means to get this under control.
Possible Conflicts with other VSCode Extensions
Note1: This extension now replaces the Spin by Entomy vscode extension. While either can be used, our version provides more comprehensive Syntax highlighting (as the former has not been maintained) and this extension adds full Semantic Highlighting, Outlining, and Tab support with InsertModes. The older Spin extension can now be uninstalled with no loss of functionality.
Note2: I'll be submitting pull requests to the Overtype extension maintainer to add code for avoiding interference with our .spin/.spin2 InsertMode feature but in the meantime please ensure that the Overtype by Adma Maras and/or Overtype by DrMerfy extensions are disabled or uninstalled as they can interfere with our extensions' behavior.
What are we doing?
The tabbing support is disabled at the first installation.
In order to use it you must enable it, and restart VSCode. Then it will be present when editing any, spin, .pasm, .spin2, or .pasm2 files.
Please let us know of any behavior you are not sure is correct or behavior that just doesn't feel right. Your feedback based on what you are experiencing will help us ensure this is working the way we all would like it to.
Tab Implementation intent: Implementation Tabbing Notes
New Insert Mode operation: Insert Modes for Spin and Spin2
When you find things (or wish for new behaviors) let me know here: Repo Issues Page
About this extension
You can always review the Spin2 Extension ChangeLog from within VSCode or at github for more details.
Reminder: The Spin2 extension is in the VSCode marketplace. After one has a working install of VSCode then from within the VSCode Extensions panel search for Spin2, install it and you are good to go. Once installed it will automatically notify you of new update availability whenever I publish new updates.
If you are already using this extension and for some reason, it did not update for you automatically, in VSCode go to your extensions view (SHIFT+CMD+X), and type in spin2. On the left, the info panel for the extension should appear and will indicate that an update has happened or needs to happen. Update it if needed.
NOTE You may want to double-check that all older versions are removed from your .vscode/extensions folder after installing any new version.
If you find code that you believe is not highlighting correctly (yes, we will likely find some for a while yet...) then please file an issue at my github repository issues page
I also point out a number of extensions that make this an even better Spin2/Pasm2 development environment. See: my VSCode repo extensions page
There is more than just installing the extension as one needs to set up build and run facilities based on the compiler tools one is using and also based on the platform (Windows, Mac, RPi, Linux, etc.) To help us learn how to do this Ken posted a very useful VSCode P2 QuickByte.
What's next? on the horizon: (1) Finishing certification of this Spin VSCode extension for our P1 against all of the P1 Obex, and (2) fixing things seen in a couple of Spin2 code sets that are not being highlighted correctly.
Enjoy!
Stephen
Comments
I use this environment for all of my P2 work. It's way too useful as an editing/IDE so we activated the P1 support nearly as robustly as the P2 support. (I say nearly as the are many more P1 files in the P1 Obex so I've many more files to verify, yet.)
While the following is set up for P2 development using Flexspin, this is an excellent pattern for running your own favorite native compilers.
The new Spin2 VSCode Extension TASKS-User.md page describes the full setup steps for Windows, macOS, and RaspiOS (Linux variants)
You may know that I run VSCode from my macOS desktop and use it to remote into my Raspberry Pi's. In this environment, this change really helped as these new user tasks and key bindings are automatically copied to the remote machine every time I connect keeping them up-to-date from my central copy. Very nice!
While I don't remote into my windows machine I do use the VSCode Settings Sync extension on all my machines with VSCode installed. With this enabled when I move to my Windows Laptop it too has now received my central copy of the user tasks and key bindings.
Here's a summary of the build environments I run with and have tested:
We'll shortly be making updates to the quickbytes page to reflect this change in setup.
@dgately thanks for suggesting that we could be doing things in a more central fashion. That prompted me to get this tested and documented. @VBBSim thanks for testing out the flash mechanisms.
Future changes I'm contemplating: (1) adding a setting to our extension allowing one to change a PNut debug-enabled setting which would be used when building with PNut, and (2) moving to a Task Provider built into our extension which would recognize the tools installed and the OS and then provide only the tasks appropriate for the OS with the tools installed.
Enjoy!
-Stephen
NEWS
I've just released v1.9.0 of our spin2 extension, which fully supports both P1 and P2.
I haven't been announcing each of the past updates. Here is the latest:
What are we doing?
In this update, (1) I reorganized the titles of commands provided by this extension to that you can filter on "spin2" to see the full list of all the commands:
... and (2) I've added a new generate Object Interface Document command [Ctrl+Alt+d] (Control+Alt+(d)ocument) which opens the generated file to the right of the spin2 or spin file that you are editing:
If you see any issues with these new features please let us know by filing new issues at our code repo.
Possible Conflicts with other VSCode Extensions
Note: This extension replaces the Spin by Entomy vscode extension. While either can be used, our version provides more comprehensive Syntax highlighting (as the former has not been maintained) and this extension adds full Semantic Highlighting, Outlining, and Tab support with InsertModes. The older Spin extension can now be uninstalled with no loss of functionality.
About this extension
You can always review the Spin2 Extension ChangeLog from within VSCode or at github for more details.
Reminder: The Spin2 extension is in the VSCode marketplace. After one has a working install of VSCode then from within the VSCode Extensions panel search for Spin2, install it and you are good to go. Once installed it will automatically notify you of new update availability whenever I publish new updates.
If you are already using this extension and for some reason, it did not update for you automatically, in VSCode go to your extensions view (SHIFT+CMD+X), and type in spin2. On the left, the info panel for the extension should appear and will indicate that an update has happened or needs to happen. Update it if needed.
NOTE You may want to double-check that all older versions are removed from your .vscode/extensions folder after installing any new version.
If you find code that you believe is not highlighting correctly (yes, we will likely find some for a while yet...) then please file an issue at my github repository issues page
I also point out a number of extensions that make this an even better Spin2/Pasm2 development environment. See: my VSCode repo extensions page
There is more than just installing the extension as one needs to set up build and run facilities based on the compiler tools one is using and also based on the platform (Windows, Mac, RPi, Linux, etc.) To help us learn how to do this Ken posted a very useful VSCode P2 QuickByte.
There are also two new platform-specific tasks installation pages:
For any others refer to the all platform User tasks
What's next? on the horizon (yes, I'm still working on these...): (1) Finishing certification of this Spin VSCode extension for our P1 against all of the P1 Obex, and (2) fixing things seen in a couple of Spin2 code sets that are not being highlighted correctly. However, the very next item I'm working on is rewriting the semantic highlighting to use a Language Server Process behind the scenes which will allow us to awaken many more features we need.
Enjoy!
Stephen
NEWS
I've just released v1.9.8 of our spin2 extension, which fully supports both P1 and P2.
I haven't been announcing each of the past updates. Here is the latest:
What are we doing?
This is the next of a number of releases. This release introduces the "Signature Help" support for P1 and P2.
Here's an introduction video (12:30) demonstrating the new Hover features and the PUB/PRI doc generation:
Here's an introduction video (6:20) demonstrating the new Signature Help features along with updates to the PUB/PRI doc generation:
If you see any issues with these new features please let us know by filing new issues at our code repo.
Possible Conflicts with other VSCode Extensions
Note: This extension replaces the Spin by Entomy vscode extension. While either can be used, our version provides more comprehensive Syntax highlighting (as the former has not been maintained) and this extension adds full Semantic Highlighting, Outlining, and Tab support with InsertModes. The older Spin extension can now be uninstalled with no loss of functionality.
The Extension Document This v0.8.2 currently also occasionally intercepts the Ctrl+Alt+D keystroke which we use to generate documentation and our extension then doesn't get the request. I've filed an issue with that extensions' maintainer so maybe this will be fixed in the future. Meanwhile, you can either disable the Document This extension, or when you see the warning pop up from the document this extension you can usually just click in your editor window again and then press Ctrl+Alt+d again and it will work after one or more tries.
About this extension
You can always review the Spin2 Extension ChangeLog from within VSCode or at github for more details.
Reminder: The Spin2 extension is in the VSCode marketplace. After one has a working install of VSCode then from within the VSCode Extensions panel search for Spin2, install it and you are good to go. Once installed it will automatically notify you of new update availability whenever I publish new updates.
If you are already using this extension and for some reason, it did not update for you automatically, in VSCode go to your extensions view (SHIFT+CMD+X), and type in spin2. On the left, the info panel for the extension should appear and will indicate that an update has happened or needs to happen. Update it if needed.
NOTE You may want to double-check that all older versions are removed from your .vscode/extensions folder after installing any new version.
If you find code that you believe is not highlighting correctly (yes, we will likely find some for a while yet...) then please file an issue at my github repository issues page
I also point out a number of extensions that make this an even better Spin2/Pasm2 development environment. See: my VSCode repo extensions page
There is more than just installing the extension as one needs to set up build and run facilities based on the compiler tools one is using and also based on the platform (Windows, Mac, RPi, Linux, etc.) To help us learn how to do this Ken posted a very useful VSCode P2 QuickByte.
There are also two new platform-specific tasks installation pages:
For any others refer to the all platform User tasks
What's next? on the horizon (yes, I'm still working on these...): (1) Finishing certification of this Spin VSCode extension for our P1 against all of the P1 Obex, and (2) fixing things seen in a couple of Spin2 code sets that are not being highlighted correctly. However, the very next items I'm working on are a number of small releases (this being the first) followed by adding a new Spin/Spin2 Language Server Process behind the scenes which will allow us to awaken many more features we need.
Enjoy!
Stephen
NEWS
After many months of thinking this couldn't be done in VSCode, I found an extension that demonstrated how it could be. So after a bit of work... ;-)
I've just released v1.9.12 of our spin2 extension, which fully supports both P1 and P2.
What are we doing?
This is the next of a number of releases. This release introduces the "Spin/Spin2 Code Block Coloring" support for P1 and P2.
For help with enabling this new feature see Spin2/Pasm2 Editor Background Coloring for VSCode
If you see any issues with these new features please let us know by filing new issues at our code repo.
Possible Conflicts with other VSCode Extensions
Note: This extension replaces the Spin by Entomy vscode extension. While either can be used, our version provides more comprehensive Syntax highlighting (as the former has not been maintained) and this extension adds full Semantic Highlighting, Outlining, and Tab support with InsertModes. The older Spin extension can now be uninstalled with no loss of functionality.
The Extension Document This v0.8.2 currently also occasionally intercepts the Ctrl+Alt+D keystroke which we use to generate documentation and our extension then doesn't get the request. I've filed an issue with that extensions' maintainer so maybe this will be fixed in the future. Meanwhile, you can either disable the "Document This" extension or when you see the warning pop up from the document this extension you can usually just click in your editor window again and then press Ctrl+Alt+d again and it will work after one or more tries.
About this extension
You can always review the Spin2 Extension ChangeLog from within VSCode or at github for more details.
Reminder: The Spin2 extension is in the VSCode marketplace. After one has a working install of VSCode then from within the VSCode Extensions panel search for Spin2, install it and you are good to go. Once installed it will automatically notify you of new update availability whenever I publish new updates.
If you are already using this extension and for some reason, it did not update for you automatically, in VSCode go to your extensions view (SHIFT+CMD+X), and type in spin2. On the left, the info panel for the extension should appear and will indicate that an update has happened or needs to happen. Update it if needed.
NOTE You may want to double-check that all older versions are removed from your .vscode/extensions folder after installing any new version.
If you find code that you believe is not highlighting correctly (yes, we will likely find some for a while yet...) then please file an issue at my github repository issues page
I also point out a number of extensions that make this an even better Spin2/Pasm2 development environment. See: my VSCode repo extensions page
There is more than just installing the extension as one needs to set up build and run facilities based on the compiler tools one is using and also based on the platform (Windows, Mac, RPi, Linux, etc.) To help us learn how to do this Ken posted a very useful VSCode P2 QuickByte.
There are also three platform-specific tasks installation pages:
What's next? on the horizon (yes, I'm still working on these...): (1) Finishing certification of this Spin VSCode extension for our P1 against all of the P1 Obex, and (2) fixing things seen in a couple of Spin2 code sets that are not being highlighted correctly. However, the very next items I'm working on are a number of small releases (this being one of a couple) followed by adding a new Spin/Spin2 Language Server Process behind the scenes which will allow us to awaken many more features we need.
Enjoy!
Stephen
NEWS
It's time to quickly evaluate the feature parity version of the new Language-Server-based VSCode Extension for P1 and P2 so I can get it released for all of us to use.
I'm looking for a few volunteers who would want to evaluate the new extension against their code. The key here is that the code must compile with PNut or Propeller Tool. For this effort, I'm NOT looking into FlexSpin compatibility with this initial testing.
My immediate focus is to ensure that there are no regressions relative to the way the current v1.9.16 Spin2 extension is working.
I believe the parser is more robust as I've been reviewing all my regression test code, and it's looking quite good.
Here's my ask:
Sound like you want to help? You can email me volunteering at stephen@ironsheep.biz
NEWS
Finally, After more than a month of work...
I've just released v2.1.0 of our spin2 extension. This is the first Language-server-based version of the extension.
If you see any issues with these new features please let us know by filing new issues at our code repo. (or email me directly.)
This represents a whole lot of change. Please be sensitive to things being different. My goal in this extension is to do our best to parse the language implemented by PNut and Propeller Tool. If any warnings are not correct relative to what these two tools do, please let me know, and I'll work to quickly get the issue fixed!
Possible Conflicts with other VSCode Extensions
Note: This extension replaces the Spin by Entomy vscode extension. While either can be used, our version provides more comprehensive Syntax highlighting (as the former has not been maintained) and this extension adds full Semantic Highlighting, Outlining, and Tab support with InsertModes. The older Spin extension can now be uninstalled with no loss of functionality.
The Extension Document This v0.8.2 currently also occasionally intercepts the Ctrl+Alt+D keystroke, which we use to generate documentation and our extension then doesn't get the request. I've filed an issue with that extensions' maintainer so maybe this will be fixed in the future. Meanwhile, you can either disable the "Document This" extension or when you see the warning pop up from the Document This extension, you can usually just click in your editor window again and then press Ctrl+Alt+d again and it will work after one or more tries.
About this extension
You can always review the Spin2 Extension ChangeLog from within VSCode or at github for more details.
Reminder: The Spin2 extension is in the VSCode marketplace. After one has a working install of VSCode from within the VSCode Extensions panel, search for Spin2, install it, and you are good to go. Once installed it will automatically notify you of new update availability whenever I publish new updates.
If you are already using this extension and, for some reason, it did not update for you automatically, in VSCode, go to your extensions view (SHIFT+CMD+X), and type in spin2. On the left, the info panel for the extension should appear and will indicate that an update has happened or needs to happen. Update it if needed.
NOTE You may want to double-check that all older versions are removed from your .vscode/extensions folder after installing any new version.
If you find code that you believe is not highlighting correctly (yes, we will likely find some for a while yet...) then please file an issue at my github repository issues page
I also point out a number of extensions that make this an even better Spin2/Pasm2 development environment. See: my VSCode repo extensions page
There is more than just installing the extension as one needs to set up build and run facilities based on the compiler tools one is using and also based on the platform (Windows, Mac, RPi, Linux, etc.) To help us learn how to do this Ken posted a very useful VSCode P2 QuickByte.
There are also three platform-specific tasks installation pages:
What's next? Taking a short break, this was a lot of focused work... but then starting to add the features now enabled by our being Langauge Server based!
Enjoy!
Stephen