Visual Studio Code editor for P1 & P2 (spin & pasm)

2»

Comments

  • Update, here's what I'm working on... (in between my RGB LED Matrix driver efforts)

    - (1) Language syntax highlighting - our SPIN2/PASM2 languages together have some 800ish keywords... I'm only partway done adding them. I have created the definition for the autoclose behavior for this language and that's working well. Work in progress

    - (2) Outline navigation of the current file does not work for SPIN/PASM. I've started to add it but my initial attempt is not yet working. I found an example project to start from. This will probably be one, maybe two, pages of code. This is not a large effort. (it's written in TypeScript). Work in progress

    - (3) I've been playing with packaging the extensions. I finally know how to, and have successfully generated my first .vsix files. These are what get distributed to the marketplace, eventually, but for now, I'll just post them here when we have updates. Work in Progress

    - (4) The theme needs to be updated once the syntax highlighting is working as that creates the names of objects that can be colored. Work in progress

    - (5) We need to add the compile and download mechanism yet. Setting it up and testing - Work in Progress. I've worked in vscode environments where it watches for file saves and then automatically compiles. This seems like what we want, right? (with downloads only attempted when compile succeeds, of course.)

    I just wanted to indicate that progress is being made. If any of you happen to have experience building vscode extensions or happen to know someone that does that would be willing to help, please contact me. I'd welcome the help! Of course, I'll keep pushing on this.

    I'm planning on doing the next release for us all to play with when I get (1) further along and (4) sync'd to it.

    After that, I'll push new updates when we fix things we've found and/or as (2) and (5) get completed.

    I'm using what I have so far, daily! It is getting better... it's just taking time!

    Regards,
    Stephen
  • Nice work Stephen :)
  • Well, things have progressed well.
    I'm attaching the latest vscode extension. It's a zip file. Download it and unzip it.

    Then you can do a manual install by using the command-line shown in these INSTALL instructions

    You may want to review what vscode extensions you have installed and then remove any earlier versions. (They are likely "spin1", "spin2", and "spin-theme" in your extensions directory.)

    Please let me know what you think of this so far. This should work pretty well with your favorite theme. I have included the "Spin2 IronSheep" theme which is what I use during verification of the work. It's pretty colorful so I can tell quickly which parts are working. However, this is what I'm also using day-2-day so it functions well.

    Once you have this installed, then please take the time to find it in your list of installed extensions. Once you find it, you'll see three tabs on that page, please review them as I'll change the content there with each new release. They are "Details", "Feature Contributions" and "Changelog". Details has operational notes for you while the Changelog has specifics about what's working, what's not, problems we already know of, etc. Also, you'll see a list of things we are next working on. See it is things you'll want to review each time, right?

    Alright. Enjoy! Please let me know if you like the progress so far and where it's heading.

    Regards,
    Stephen
  • You guys are now on the hook for a quick demo of VSC at a future P2 Live Forum.

    Ken Gracey
  • Here's a quick intro to the new Spin2/Pasm2 VSCode Extension:



    Enjoy!
  • TIA Stephen. This is a great step forward :)

    I'll let you know how it goes but it will not be until mid-week as I have to concentrate on getting some other things done while fitting in with work.
  • Nice Stephen!
  • That’s fantastic! (Good to know it runs on Mac! LOL)
  • Ok, time to put this to work!

    This new version v0.2.0 complete's the Pasm2 and Spin2 language definition as well as add all Streamer constants and SmartPin constants.

    Let's exercise this and please let me know if you see things that could/should be improved.

    I'm taking a break now since this is fully functional to get back to my RGB LED Matrix driver and hopefully scheduling PCB production.

    Meanwhile, you can advise what you think the priority for my next efforts on this extension should be from amongst items that are shown in the ChangeLog "Unreleased" section.

    Please tell me which are most important to you in how you use vscode! If I'm missing something important, please note that for me too!

    Regards,
    Stephen
  • Cluso99Cluso99 Posts: 16,909
    edited 2020-11-10 - 23:04:26
    Congratulations Stephen :smiley:
    works nicely, outline is a great feature too!

    Windows installation notes

    Unzip file
    Unzip the zip file to extract "spin2-?.?.?.vsix" and copy/move it to your windows %userprofile% folder (ie C:\Users\<username>\ so mine is C:\Users\Ray\ )

    Install vscode extension (manually)
    Open a windows command prompt (Start | Windows System | Command Prompt)
    C:\Users\Ray>
    enter "code --install-extension spin2-?.?.?.vsix" without the double-quotes (replace the '?' wildcards with the version number)

    Close the command prompt window and we're done.

    Here is the command prompt dialog (note the warning)
    Microsoft Windows [Version 10.0.18363.1139]
    (c) 2019 Microsoft Corporation. All rights reserved.
    
    C:\Users\Ray>code --install-extension spin2-0.2.0.vsix
    Installing extensions...
    (node:7652) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
    Extension 'spin2-0.2.0.vsix' was successfully installed.
    
    C:\Users\Ray>
    
    vsc-spin2-0.2.0.jpg
    852 x 708 - 147K
  • Stephen,
    Just noticed that some color formatting is being lost, possibly due to nested if statements. See the attached jonnymac serial driver from line 398 onwards.
  • Stephen MoracoStephen Moraco Posts: 95
    edited 2020-11-17 - 05:26:06
    Cluso99 wrote: »
    Just noticed that some color formatting is being lost, possibly due to nested if statements. See the attached jonnymac serial driver from line 398 onwards.

    Thanks for the heads up! I've also found a couple of things. Give me a couple of days and I'll roll in updates... And by all means, keep reporting anything any of you find!
Sign In or Register to comment.