VSCode support for the Parallax Propeller v1 & v2 8-Core MCU'sSpin/Spin2 Language-Server based VSCode Extension P1 and P2 Syntax/Semantic Highlighting and Code Navigation for VSCodeThis Extension is continually in development. Things may, occasionally, not work correctly. See Support, below, for how to report issues. ABOUTThis extension provides support for P1 (spin and pasm) along with P2 (Spin2 and Pasm2), the primary languages for programming P1 Parallax Propeller 1 or P8X32A and the P2 Parallax Propeller2 or P2X8C4M64P We've moved to a Language Server based extension so that we can awaken multi-file behaviors such as show help from included file in top-level file when hovering or showing signature help. This also applies to upoming features such as go to definition. All features provided by this extension support both the Parallax Propeller 1 and Propeller 2 languages: Spin and Pasm. Feature: Syntax HighlightingBoth Spin and Pasm are now completely supported for the P1 while Spin2 and Pasm2 are completely supported for the P2 - including streamer and smartpins constants Feature: Semantic HighlightingP1 Spin/Pasm along with P2 Spin2/Pasm2 are fully supported and will be improving over future releases. See the ChangeLog for detailed status. Feature: Code OutlineThe code outline for .spin and .spin2 files works as follows:
Hint: Configure the OUTLINE panel to Feature: Tab-stop support à la Propeller Tool(Initial Tabbing Feature contributed by Jay B. Harlow)
Feature: Screen Coloring à la Propeller ToolThe background coloring is now capable of looking like our familiar Propeller Tool colors.
Feature: Object Hierarchy view à la Propeller Tool
Feature: Show HoversHovers show information about the symbol/object that's below the mouse cursor. This is usually the type of the symbol and a description.
Feature: Help With Method SignaturesHelp With Method Signatures displays information about the method that is being called as you are typing the code that is invoking the method. This works for Spin/Spin2 built-in methods as well as your own PUB and PRI methods in the same file.
Feature: Show Definitions of a SymbolPeek at or go to the definition of variables/methods from where the variables/methods are being used.
Feature: Code FoldingProvides Spin specific code folding support
Feature: Generate "Object public interface" documentationUpon pressing Ctrl+Alt+d (control alt document) the editor will now generate a This document is nearly the same as that produced by Propeller Tool except the compiler is not being run so the document does not contain information about the size of compiled object.
The above information in not present in the VSCode generated documentation file. Feature: Generate PUB and PRI comment blocksPlace your cursor over a PUB or PRI method signature and press Ctrl+Alt+c (control alt comment) and a comment block will be inserted immediately below the signature line. Then simply fill in the description. In the case of PUB methods the comment block will use single line doc-comments for public information so these comments will be included in "Object public interface" documentat when it is generated. Sample PUB doc-comment:Press Ctrl+Alt+c (control alt comment) on this line:
... and you are presented with:
Fill it in like this:
Note: for PUB methods this generates a mixed block of comments using single line doc-comments for the public information and single line non-doc comments for the private parts (local vaariables). This is so that the doc comments of public methods will be included in generated documentaion for this object. Sample PRI doc-comment:Press Ctrl+Alt+c (control alt comment) on this line:
... and you are presented with:
Fill it in like this:
Note: for PRI methods this generates a block of single line non-doc comments. This is so the comment for private methods are not included in generated documentaion for this object. Possible Conflicts with other VSCode ExtensionsNOTE1: This extension now replaces the Spin by Entomy vscode extension. While either can be used, this version provides more comprehensive Syntax highlighting (as the former has not been maintained) and this extension adds full Semantice Highlighting, Outlining and Tab support with InsertModes. The NOTE2: I'll be submitting pull requests to the Overtype extension maintainer to add code for avoiding interferrance 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 this extensions' behavior. Known IssuesWe are working on fixes to the following issues we've seen during our testing. However, they are not major enough to prevent this release.
The above appear to be mostly syntax recognizer issues There are some things that currently are limitations which we may or may not address in the future:
Reporting IssuesAn active list of issues is maintained at github. P2-vscode-langserv-extension/Issues. When you want to report something missing, not working right, or even request a new feature please submit an issue. By doing so you will be able to track progress against the request and learn of the new version containing your fix/enhancement when it is available.
|