Giter Site home page Giter Site logo

ironsheep / p2-vscode-extensions Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 2.0 6.62 MB

VSCode support for SPIN/PASM for Propeller V1 and V2

License: MIT License

JavaScript 0.08% TypeScript 87.76% Python 4.73% Propeller Spin 6.96% Shell 0.47%
parallax-propeller-microcontroller propeller2 vscode-extension vscode-theme propeller propeller-spin spin2 vscode

p2-vscode-extensions's Introduction

Parallax Propeller 2 VSCode support

Project Maintenance License Release GitHub issues

Spin2 Extension: Version Installs Ratings

VSCode support for the Propeller languages: Spin2 and Pasm2 for the Parallax Inc. Propeller 2 P2 or P2X8C4M64P along with Spin and Pasm support for the Propeller 1. The P2 and P1 communities thrive in the P2 Forums and the P1 Forums

The P2 Forum Thread containing discussion of this VSCode support

Features

  • Full support for both P1 (spin/pasm) and P2 (spin2/pasm2) languages
  • P2 Support:
    • P2: 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
    • P2: Show Hovers Feature Hovers show information about the symbol/object that's below the mouse cursor. In our case this is for both user written code and for Spin2 built-ins.
    • P2: Signature Help Feature As you are typing a method name show signature help for both user written methods and for Spin2 built-in methods.
  • P1 Support:
    • P1: Syntax and Semantic Highlighting for both Spin and Pasm
    • P1: Show Hovers Feature Hovers show information about the symbol/object that's below the mouse cursor. In our case this is for both user written code and for Spin built-ins.
    • P1: Signature Help Feature As you are typing a method name show signature help for both user written methods and for Spin built-in methods.
  • Object Public interface documentation generation via keystroke [Ctrl+Alt+d], doc opens on right side of editor
  • Doc-Comment Generation for PUB and PRI methods via keystroke [Ctrl+Alt+c] - Ctrl+Alt+( c )omment.
    - Comment is inserted immediately below the PUB or PRI line.
  • Editor Screen Coloring support per section à la Parallax Propeller Tool
  • 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
  • File navigation from Object Hierarchy View
  • Edit Mode support à la Parallax Propeller Tool [Insert, Overtype and Align]
  • Provides rich companion themes for use with non-color backgrounds or with colored backgrounds as well as Syntax only theme (mostly used during semantic highlighting development

Up next

We are working to routinely add features to this extension for the next month or two. The hover support for P2 just arrived, here the next updates in the works:

  • Improve Hover support for P2

These are not yet definate but I'm:

  • Looking into providing a full spin/spin2 language server. This would allow all files in the project to contribute symbols, not just the current file being edited
  • Looking into adding a setting to our extension allowing one to change a "PNut Enable Debug" setting which would be used when building with on windows with PNut
  • Looking into developing a Task Provider (to be 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.

Future directions

  • Task Provider - studies the current environment and offers to write the tasks for a given P2 project
  • Spin2/Pasm2 code formatter/beautifier - allows us to have standard formatting for code we share! (source code could be formatted on each file save)
  • Snippets for Spin2/Pasm2 (common code sequences which can be added easily to file being edited (e.g., smart pin setup code for given mode/use)
  • Possible Extension Package for P2 (would include all P2 specific extensions)

Installation

In VSCode search for the "spin2" extension and install it. It's that easy! After installation you will be notified to download and install a new version as new versions are released.

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, Document generation, etc. The older Spin extension can now be uninstalled with no loss of functionality.

VSCode Environment

There are additional companion documents in this Repository:

  1. Configuring User Tasks - Windows which advises on how to automate your P2 Development when using VScode on Windows
  2. Configuring User Tasks - MacOS which advises on how to automate your P2 Development when using VScode on macOS
  3. Configuring User Tasks - Windows|MacOS|RPI which advises on how to automate your P2 Development when using VScode on any of the supported platforms
  4. Configure VSCode for background coloring by Spin Block how to set up coloring and some additional notes
  5. VSCode Extensions we find useful in our own P2 development
  6. Visual Examples - Tabbing a visual explaination of how our Tabbing feature works (For those of us, like me, who understand more easily when we see pictures.)
  7. Engineering Notes - Tabbing more detailed description of how our Tabbing feature works

Also, here are a couple of really useful VSCode sources:

  • VSCode can do that? Fun website showing specific things VSCode can do - review whats possible that may help you in your use of VSCode.
  • YouTube Channel: Code 2020 - A large list of short videos presenting all manner of useful VSCode tips.

Please go look at each of these once so you can know what's here when you need them!

Known Conflicts with other VSCode Extensions

We know the three extension so far which might interfere with our Spin2 extension. Here's what we've seem:

  1. If I haven't already, I'll be submitting pull requests to the Overtype extension maintainers 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.
  2. 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.

Repository Notes

This repository contains a single subproject which is the vscode extension:

  • SPIN2/SPIN and PASM2/PASM syntax Highlighting and code navigation spin2 - Builds

If you like my work and/or this has helped you in some way then feel free to help me out for a couple of ☕'s or 🍕 slices or support my work by contributing at Patreon!

coffee    -OR-    PatreonPatreon.com/IronSheep


Credits

Ray [Cluso99] in our Propeller 2 Forums which started this effort for us.

Patrick (GitHub Entomy) for a spin1 extension which helped me get further along with this one.

Jay B. Harlow for contributing the initial elastic tabs feature.

George (GitHub DrMerfy) for the latest VSCode-Overtype extension which provided the foundation to which we could add the Align mode.

License

Copyright © 2023 Iron Sheep Productions, LLC.
Licensed under the MIT License.

Follow these links for more information:

p2-vscode-extensions's People

Contributors

ironsheep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

p2-vscode-extensions's Issues

Overtype/Align toggle by default only active in Spin files

By default the overtype/align keybind has a when clause of editorFocus && editorLangId == 'spin(2)'.

However, the extension is active in all files, so if you toggled it into a different mode you can't change it back without opening a Spin file. Since the functionality isn't Spin-specific I'd just remove the editorLangId check.

Caret/xor operator is treated as part of identifier

Checklist:

  • I updated to the latest spin2 version available
  • I have restarted VSCode and the problem still exists

Description of problem:
Caret/xor operator is treated as part of identifier. This doesn't happen with plus/minus/star/etc, but I haven't exhaustively tested all operators.

image

Additional information: (please attach your source file (.spin2) exhibiting the problem you are describing.)
https://github.com/IRQsome/NeoYume/blob/2a764eb5ea9c3bab88325db58d6a07bdc712fae7/neoyume_lower.spin2#L3103

Flexspin conditional assembly not recognized and ends up polluting outline

and have you...

  • I updated to the latest spin2 version available
  • I have restarted VSCode and the problem still exists

Version of Spin2 VScode Extension with the issue

whatever is current

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Hardware, Operating System, Operating System version, VSCode version

Hardware: A fresh potato
OS Ver: OS/2 WARP

Description of problem

Try loading this file: https://github.com/Wuerfel21/usbnew/blob/master/usbnew.spin2

Outline goes wild
image

Additional information

No response

"long(..." incorrectly detected as label

lmao.
image

example snippet:

DAT ' ZiKore Z80 LUT resident code
              org $200
zk_lutbase
              '' Opcode table
              long zk_nextop                            ' $00: NOP
              long zk_loadimm16 + (%0000_1_111_0<<10)   ' $01: LD BC,imm16
              long zk_a_and_ptr + (%001110<<10)         ' $02: LD (BC),A
              long zk_incdec16+(%0000_1_1111_10_1_11100<<10) ' $03: INC BC
              long zk_incdec8+(%01_11_00_0110_1100_0_10_1111_00<<10) ' $04: INC B
              long zk_incdec8+(%01_11_00_0110_0011_0_10_1111_00<<10) ' $05: DEC B
              long zk_loadimm8                          ' $06: LD B,imm8
              long zk_rolla+(%0_010_110_01_11110_00<<10) ' $07: RLCA
              long zk_ex_af                             ' $08: EX AF,AF'
              long zk_math16+(%0010_111_00_1100_00_1110_1_0<<10) ' $09: ADD HL,BC
              long zk_a_and_ptr + (%000010<<10)         ' $0A: LD A,(BC)
              long zk_incdec16+(%0000_1_1111_01_1_11100<<10) ' $0B: DEC BC
              long zk_incdec8+(%01_11_00_0110_1100_0_10_1111_00<<10) ' $0C: INC C
              long zk_incdec8+(%01_11_00_0110_0011_0_10_1111_00<<10) ' $0D: DEC C
              long zk_loadimm8                          ' $0E: LD C,imm8
              long zk_rolla+(%0_010_001_01_11011_00<<10) ' $0F: RRCA
              long zk_jr + (%01_11_0000_0<<10)          ' $10: DJNZ
              long zk_loadimm16 + (%0001_1_111_0<<10)   ' $11: LD DE,imm16
              long zk_a_and_ptr + (%00110 <<10)+1       ' $12: LD (DE),A
              long zk_incdec16+(%0001_1_1111_10_1_11010<<10) ' $13: INC DE
              long zk_incdec8+(%01_11_00_0110_1100_0_10_1111_00<<10) ' $14: INC D
              long zk_incdec8+(%01_11_00_0110_0011_0_10_1111_00<<10) ' $15: DEC D
              long zk_loadimm8                          ' $16: LD D,imm8
              long zk_rolla+(%0_010_110_00_11110_00<<10) ' $17: RLA
              long zk_jr + (%11_11_1111_0<<10)          ' $18: JR
              long zk_math16+(%0010_111_00_1100_00_1101_1_0<<10) ' $19: ADD HL,DE
              long zk_a_and_ptr + (%00000 <<10)+1       ' $1A: LD A,(DE)
              long zk_incdec16+(%0001_1_1111_01_1_11010<<10) ' $1B: DEC DE
              long zk_incdec8+(%01_11_00_0110_1100_0_10_1111_00<<10) ' $1C: INC E
              long zk_incdec8+(%01_11_00_0110_0011_0_10_1111_00<<10) ' $1D: DEC E
              long zk_loadimm8                          ' $1E: LD E,imm8
              long zk_rolla+(%0_010_001_00_11011_00<<10) ' $1F: RRA
              long zk_jr + (%01_10_1111_0<<10)          ' $20: JR NZ
              long zk_loadimm16 + (%0011_1_111_0<<10)   ' $21: LD HL,imm16
              long zk_ld_abs16 + (%01011_00<<10)        ' $22: LD (imm16),HL
              long zk_incdec16+(%0011_1_1111_10_1_10110<<10) ' $23: INC HL
              long zk_incdec8+(%01_11_00_0110_1100_0_10_1111_00<<10) ' $24: INC H
              long zk_incdec8+(%01_11_00_0110_0011_0_10_1111_00<<10) ' $25: DEC H
              long zk_loadimm8                          ' $26: LD H,imm8
              long zk_daa                               ' $27: DAA
              long zk_jr + (%00_10_1111_0<<10)          ' $28: JR Z
              long zk_math16+(%0010_111_00_1100_00_1011_1_0<<10) ' $29: ADD HL,HL
              long zk_ld_abs16 + (%00110_11111_00<<10)  ' $2A: LD HL,(imm16)
              long zk_incdec16+(%0011_1_1111_01_1_10110<<10) ' $2B: DEC HL
              long zk_incdec8+(%01_11_00_0110_1100_0_10_1111_00<<10) ' $2C: INC L
              long zk_incdec8+(%01_11_00_0110_0011_0_10_1111_00<<10) ' $2D: DEC L
              long zk_loadimm8                          ' $2E: LD L,imm8
              long zk_cpl                               ' $2F: CPL
              long zk_jr + (%01_01_1111_0<<10)          ' $30: JR NC
              long zk_loadimm16 + (%0111_1_111_0<<10)   ' $31: LD SP,imm16
              long zk_ld_abs + (%001111_00<<10)         ' $32: LD (imm16),A
              long zk_incdec16+(%0111_1_1111_10_1_01110<<10) ' $33: INC SP
              long zk_incdec8+(%01_11_00_0110_1100_0_10_1111_00<<10)+ZK_HLOP ' $34: INC (HL)
              long zk_incdec8+(%01_11_00_0110_0011_0_10_1111_00<<10)+ZK_HLOP ' $35: DEC (HL)
              long zk_loadimm8 + ZK_HLOP                ' $36: LD (HL),imm8
              long zk_scf + (%10 << 10)                 ' $37: SCF
              long zk_jr + (%00_01_1111_0<<10)          ' $38: JR C
              long zk_math16+(%0010_111_00_1100_00_0111_1_0<<10) ' $39: ADD HL,SP
              long zk_ld_abs + (  %0011_00<<10)         ' $3A: LD A,(imm16)
              long zk_incdec16+(%0111_1_1111_01_1_01110<<10)' $3B: DEC SP
              long zk_incdec8+(%01_11_00_0110_1100_0_10_1111_00<<10) ' $3C: INC A
              long zk_incdec8+(%01_11_00_0110_0011_0_10_1111_00<<10) ' $3D: DEC A
              long zk_loadimm8                          ' $3E: LD A,imm8
              long zk_ccf                               ' $3F: CCF
              long zk_nextop                            ' $40: LD B,B (NOP)
              long zk_regmove                           ' $41: LD B,C
              long zk_regmove                           ' $42: LD B,D
              long zk_regmove                           ' $43: LD B,E
              long zk_regmove                           ' $44: LD B,H
              long zk_regmove                           ' $45: LD B,L
              long zk_regmove + ZK_HLOP                 ' $46: LD B,(HL)
              long zk_regmove                           ' $47: LD B,A
              long zk_regmove                           ' $48: LD C,B
              long zk_nextop                            ' $49: LD C,C (NOP)
              long zk_regmove                           ' $4A: LD C,D
              long zk_regmove                           ' $4B: LD C,E
              long zk_regmove                           ' $4C: LD C,H
              long zk_regmove                           ' $4D: LD C,L
              long zk_regmove + ZK_HLOP                 ' $4E: LD C,(HL)
              long zk_regmove                           ' $4F: LD C,A
              long zk_regmove                           ' $50: LD D,B
              long zk_regmove                           ' $51: LD D,C
              long zk_nextop                            ' $52: LD D,D (NOP)
              long zk_regmove                           ' $53: LD D,E
              long zk_regmove                           ' $54: LD D,H
              long zk_regmove                           ' $55: LD D,L
              long zk_regmove + ZK_HLOP                 ' $56: LD D,(HL)
              long zk_regmove                           ' $57: LD D,A
              long zk_regmove                           ' $58: LD E,B
              long zk_regmove                           ' $59: LD E,C
              long zk_regmove                           ' $5A: LD E,D
              long zk_nextop                            ' $5B: LD E,E (NOP)
              long zk_regmove                           ' $5C: LD E,H
              long zk_regmove                           ' $5D: LD E,L
              long zk_regmove + ZK_HLOP                 ' $5E: LD E,(HL)
              long zk_regmove                           ' $5F: LD E,A
              long zk_regmove                           ' $60: LD H,B
              long zk_regmove                           ' $61: LD H,C
              long zk_regmove                           ' $62: LD H,D
              long zk_regmove                           ' $63: LD H,E
              long zk_nextop                            ' $64: LD H,H (NOP)
              long zk_regmove                           ' $65: LD H,L
              long zk_regmove + ZK_HLOP                 ' $66: LD H,(HL)
              long zk_regmove                           ' $67: LD H,A
              long zk_regmove                           ' $68: LD L,B
              long zk_regmove                           ' $69: LD L,C
              long zk_regmove                           ' $6A: LD L,D
              long zk_regmove                           ' $6B: LD L,E
              long zk_regmove                           ' $6C: LD L,H
              long zk_nextop                            ' $6D: LD L,L (NOP)
              long zk_regmove + ZK_HLOP                 ' $6E: LD L,(HL)
              long zk_regmove                           ' $6F: LD L,A
              long zk_regmove + ZK_HLOP                 ' $70: LD (HL),B
              long zk_regmove + ZK_HLOP                 ' $71: LD (HL),C
              long zk_regmove + ZK_HLOP                 ' $72: LD (HL),D
              long zk_regmove + ZK_HLOP                 ' $73: LD (HL),E
              long zk_regmove + ZK_HLOP                 ' $74: LD (HL),H
              long zk_regmove + ZK_HLOP                 ' $75: LD (HL),L
              long zk_halt                              ' $76: HALT
              long zk_regmove + ZK_HLOP                 ' $77: LD (HL),A
              long zk_regmove                           ' $78: LD A,B
              long zk_regmove                           ' $79: LD A,C
              long zk_regmove                           ' $7A: LD A,D
              long zk_regmove                           ' $7B: LD A,E
              long zk_regmove                           ' $7C: LD A,H
              long zk_regmove                           ' $7D: LD A,L
              long zk_regmove + ZK_HLOP                 ' $7E: LD A,(HL)
              long zk_nextop                            ' $7F: LD A,A (NOP)
              long(zk_math8 + (%10_11_00_0000_1100_0_10_001_0<<10) )[6]' $80..$85: ADD A,[BCDEHL]
              long zk_math8 + (%10_11_00_0000_1100_0_10_001_0<<10) + ZK_HLOP ' $86: ADD A,(HL)
              long zk_math8 + (%10_11_00_0000_1100_0_10_001_0<<10) ' $87: ADD A,A
              long(zk_math8 + (%10_11_00_0000_1100_0_01_001_0<<10) )[6]' $88..$8D: ADC A,[BCDEHL]
              long zk_math8 + (%10_11_00_0000_1100_0_01_001_0<<10) + ZK_HLOP ' $8E: ADC A,(HL)
              long zk_math8 + (%10_11_00_0000_1100_0_01_001_0<<10) ' $8F: ADC A,A
              long(zk_math8 + (%10_11_00_0000_0011_0_10_001_0<<10) )[6]' $90..$95: SUB [BCDEHL]
              long zk_math8 + (%10_11_00_0000_0011_0_10_001_0<<10) + ZK_HLOP ' $96: SUB (HL)
              long zk_math8 + (%10_11_00_0000_0011_0_10_001_0<<10) ' $97: SUB A
              long(zk_math8 + (%10_11_00_0000_0011_0_01_001_0<<10) )[6]' $98..$9D: SBC A,[BCDEHL]
              long zk_math8 + (%10_11_00_0000_0011_0_01_001_0<<10) + ZK_HLOP ' $9E: SBC A,(HL)
              long zk_math8 + (%10_11_00_0000_0011_0_01_001_0<<10) ' $9F: SBC A,A
              long(zk_logic + (%000000_110_0<<10))[6]   ' $A0..$A5: AND [BCDEHL]
              long zk_logic + (%000000_110_0<<10) + ZK_HLOP ' $A6: AND (HL)
              long zk_logic + (%000000_110_0<<10)       ' $A7: AND A
              long(zk_logic + (%001000_011_0<<10))[6]   ' $A8..$AD: XOR [BCDEHL]
              long zk_logic + (%001000_011_0<<10) + ZK_HLOP ' $AE: XOR (HL)
              long zk_logic + (%001000_011_0<<10)       ' $AF: XOR A
              long(zk_logic + (%001000_101_0<<10))[6]   ' $B0..$B5: OR [BCDEHL]
              long zk_logic + (%001000_101_0<<10) + ZK_HLOP ' $B6: OR (HL)
              long zk_logic + (%001000_101_0<<10)       ' $B7: OR A
              long(zk_math8 + (%11_00_00_0000_0011_0_10_001_0<<10) )[6]' $B8..$BD: CP [BCDEHL]
              long zk_math8 + (%11_00_00_0000_0011_0_10_001_0<<10) + ZK_HLOP ' $BE: CP (HL)
              long zk_math8 + (%11_00_00_0000_0011_0_10_001_0<<10) ' $BF: CP A
              long zk_condret+(%0101_11_00_01_1110_0<<10) ' $C0: RET NZ
              long zk_poppair+(%0_0<<10)                  ' $C1: POP BC
              long zk_jump  + (%0101_11_01_01_1110_10<<10) ' $C2: JP NZ,imm16
              long zk_jump  + (%0101_11_01_11_1111_10<<10) ' $C3: JP imm16
              long zk_jump  + (%0000_11_01_01_1110_10<<10) ' $C4: CALL NZ,imm16
              long zk_pushbc+(%0_1110<<10)              ' $C5: PUSH BC
              long zk_immmath + (%10_11_00_0000_1100_0_10_00_0<<10) ' $C6: ADD A,imm8
              long zk_rst                               ' $C7: RST 00h
              long zk_condret+(%0101_11_00_00_1110_0<<10) ' $C8: RET Z
              long zk_ret + (%0101_11_00<<10)           ' $C9: RET
              long zk_jump  + (%0101_11_01_00_1110_10<<10)' $CA: JP Z,imm16
              long zk_bitprefix + ZK_HLOP               ' $CB: bit op prefix
              long zk_jump  + (%0000_11_01_00_1110_10<<10)' $CC: CALL Z,imm16
              long zk_jump  + (%0000_11_01_11_1111_10<<10)' $CD: CALL imm16
              long zk_immmath + (%10_11_00_0000_1100_0_01_00_0<<10) ' $CE: ADC A,imm8
              long zk_rst                               ' $CF: RST 08h
              long zk_condret+(%0101_11_00_01_1101_0<<10) ' $D0: RET NC
              long zk_poppair+(%01_0<<10)                 ' $D1: POP DE
              long zk_jump  + (%0101_11_01_01_1101_10<<10)' $D2: JP NC,imm16
              long zk_immio + (%00_00<<10)                ' $D3: OUT (imm8),A
              long zk_jump  + (%0000_11_01_01_1101_10<<10)' $D4: CALL NC,imm16
              long zk_pushde+(%0_110<<10)               ' $D5: PUSH DE
              long zk_immmath + (%10_11_00_0000_0011_0_10_00_0<<10) ' $D6: SUB imm8
              long zk_rst                               ' $D7: RST 10h
              long zk_condret+(%0101_11_00_00_1101_0<<10) ' $D8: RET C
              long zk_exx                               ' $D9: EXX
              long zk_jump  + (%0101_11_01_00_1101_10<<10)' $DA: JP C,imm16
              long zk_immio + (%00_11_00<<10)             ' $DB: IN A,(imm8)
              long zk_jump  + (%0000_11_01_00_1101_10<<10)' $DC: CALL C,imm16
              long zk_ixprefix                          ' $DD: IX prefix
              long zk_immmath + (%10_11_00_0000_0011_0_01_00_0<<10) ' $DE: SBC A,imm8
              long zk_rst                               ' $DF: RST 18h
              long zk_condret+(%0101_11_00_01_1011_0<<10) ' $E0: RET PO
              long zk_poppair+(%0011_0<<10)               ' $E1: POP HL
              long zk_jump  + (%0101_11_01_01_1011_10<<10)' $E2: JP PO,imm16
              long zk_ex_hlstk                          ' $E3: EX (SP),HL
              long zk_jump  + (%0000_11_01_01_1011_10<<10)' $E4: CALL PO,imm16
              long zk_pushhl+(%0_10<<10)                  ' E5: PUSH HL
              long zk_immlogic + (%000000_110_1_0<<10)  ' $E6: AND imm8
              long zk_rst                               ' $E7: RST 20h
              long zk_condret+(%0101_11_00_00_1011_0<<10) ' $E8: RET PE
              long zk_jump_indir                          ' $E9: JP (HL)
              long zk_jump  + (%0101_11_01_00_1011_10<<10)' $EA: JP PE,imm16
              long zk_ex_dehl                           ' $EB: EX DE,HL
              long zk_jump  + (%0000_11_01_00_1011_10<<10)' $EC: CALL PE,imm16
              long zk_extprefix + ZK_HLOP               ' $ED: extension prefix
              long zk_immlogic + (%001000_011_1_0<<10)  ' $EE: XOR imm8
              long zk_rst                               ' $EF: RST 28h
              long zk_condret+(%0101_11_00_01_0111_0<<10) ' $F0: RET P
              long zk_poppair+(%00_1111_0<<10)            ' $F1: POP AF
              long zk_jump  + (%0101_11_01_01_0111_10<<10)' $F2: JP P,imm16
              long zk_irqoff                              ' $F3: DI
              long zk_jump  + (%0000_11_01_01_0111_10<<10)' $F4: CALL P,imm16
              long zk_pushaf+(%0_11111_00<<10)            ' $F5: PUSH AF
              long zk_immlogic + (%001000_101_1_0<<10)  ' $F6: OR imm8
              long zk_rst                               ' $F7: RST 30h
              long zk_condret+(%0101_11_00_00_0111_0<<10) ' $F8: RET M
              long zk_hl_to_sp                            ' $F9: LD SP,(HL)
              long zk_jump  + (%0101_11_01_00_0111_10<<10)' $FA: JP M,imm16
              long zk_irqon                               ' $FB: EI
              long zk_jump  + (%0000_11_01_00_0111_10<<10)' $FC: CALL M,imm16
              long zk_iyprefix + (%10<<10)              ' $FD: IY prefix
              long zk_immmath + (%11_00_00_0000_0011_0_10_00_0<<10) ' $FE: CP imm8
              long zk_rst                               ' $FF: RST 38h

Missing X_4P_4DAC1_WFBYTE symbol

Checklist:

  • I updated to the latest spin2 version available
  • I have restarted VSCode and the problem still exists

Version of Spin2 Extension with the issue: Current

Last working version (if known):

Hardware, Operating System, VSCode version: Does it really matter?

Description of problem:

image

Holding down F11 spawns multiple downloads

Checklist:

  • [X ] I updated to the latest spin2 version available
  • [X ] I have restarted VSCode and the problem still exists

Version of Spin2 Extension with the issue:
5.9.8
Last working version (if known):

Hardware, Operating System, VSCode version:
Win11, VSCode 1.64.2

If I hold F11 too long (fat finger) multiple download sessions get spawned. The work arround is to just press quickly but it caught me out a couple of times.

If there is an existing download/terminal session then don't launch the new task or add extra delay

Additional information: (please attach your source file (.spin2) exhibiting the problem you are describing.)

Show opening comment for DAT/CON sections

As is, CON/DAT just show up in the file outline as "DAT" and "CON". I usually place a comment on those first lines when I have a lot of DAT sections to make it easy to find the one I want in Propeller Tool. That should probably go on the outline.

CON ' Constants relating to.. something
  
  PANCAKES = 5

DAT ' Pancake flipping assembly code

  org 0
  [...]

Publish to OpenVSX

It turns out the non-Microsoft-Spyware forks of Code by default can not use the official extension store and use OpenVSX instead. Changing the extension store URL back to the MS one is easy, but it's probably a good idea to publish the extension there if it isn't too much hassle.

highlight issues "else if" should NOT be legal for spin2

Checklist:

  • I updated to the latest spin2 version available
  • I have restarted VSCode and the problem still exists

Version of Spin2 Extension with the issue:
v1.8.8

Last working version (if known):
Possible never has worked?

Hardware, Operating System, VSCode version:

Description of problem:

Screenshot 2023-05-30 at 3 45 18 PM

Additional information: (please attach your source file (.spin2) exhibiting the problem you are describing.)
The "Else If" in this case should be RED! (illegal). It does NOT compile!

Correctly highlight object constant overrides

Is your feature request related to a problem? Please describe.
Highlight this correctly

'' We try to positionally match the NeoGeo mini controller (NESW is CDBA)
'' Therefore, A = BT3, B = BT2, C = BT0 or BT6, D = BT1 or BT7
usb: "usbnew" | ACTIVITY_LED = -1, ERROR_LED = -1, USB_BASE_PIN = USB0_BASEPIN, OVERLAP_MEMORY = true, ...
                EMUPAD_MAX_DEV = 2, ...
                EMUPAD_UP_BIT = 0,EMUPAD_DOWN_BIT = 1,EMUPAD_LEFT_BIT = 2,EMUPAD_RIGHT_BIT = 3, ...
                EMUPAD_BT0_BIT = 6, EMUPAD_BT1_BIT = 7, EMUPAD_BT2_BIT = 5, EMUPAD_BT3_BIT = 4, ...
                EMUPAD_BT4_BIT = -1, EMUPAD_BT5_BIT = -1, EMUPAD_BT6_BIT = 6, EMUPAD_BT7_BIT = 7,  ...
                EMUPAD_BT8_BIT = 9, EMUPAD_BT9_BIT = 8, ...
                EMUPAD_KB_BT0 = $06, EMUPAD_KB_BT1 = $19, EMUPAD_KB_BT2 = $1B, EMUPAD_KB_BT3 = $1D, ...
                EMUPAD_KB_BT4 = 0, EMUPAD_KB_BT5 = 0, EMUPAD_KB_BT6 = 0, EMUPAD_KB_BT7 = 0, ...
                EMUPAD_KB_BT8 = $2A, EMUPAD_KB_BT9 = $28

Describe the solution you'd like
Line continuation is messing with later highlights throughout file

Describe alternatives you've considered
N/A

Additional context
This is a newer feature of spin2 language

REF: https://github.com/IRQsome/NeoYume/blob/slot-interleave/neoyume_input.spin2

bad case statement highlight

Checklist:

  • [X ] I updated to the latest spin2 version available
  • [X ] I have restarted VSCode and the problem still exists

Version of Spin2 Extension with the issue:
Latest

Last working version (if known):
Never worked

Hardware, Operating System, VSCode version:

N/A

Description of problem:

PRI pullUpValueForEnum(pullupRqst) : pullup
  case pullupRqst
    serIO.PU_NONE : pullup := P_HIGH_FLOAT                            ' use external pull-up
    serIO.PU_1K5  : pullup := P_HIGH_1K5                              ' 1.5k
    serIO.PU_3K3  : pullup := P_HIGH_1MA                              ' acts like ~3.3k
    other   : pullup := P_HIGH_15K                              ' 15K

Additional information: (please attach your source file (.spin2) exhibiting the problem you are describing.)
Screenshot 2023-05-15 at 4 24 30 PM

Single-line comment parsing issue

Checklist:

  • [x ] I updated to the latest spin2 version available
  • [ x] I have restarted VSCode and the problem still exists

Version of Spin2 Extension with the issue: the latest one

Last working version (if known): I think it did work at some point, but I know the previous version was busted already

Hardware, Operating System, VSCode version: Win7 on amd64, presumably latest VSC

Description of problem:

Single-line comments that follow code aren't recognized as comments anymore. Happens in every file, but here's an example in megayume (latest commit on beta branch)
image

Freeze when opening certain files

and have you...

  • I updated to the latest spin2 version available
  • I have restarted VSCode and the problem still exists

Version of Spin2 VScode Extension with the issue

whatever is current

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Hardware, Operating System, Operating System version, VSCode version

Hardware: IRQsomeSoftware(TM) shitbox(TM) Mk.I
OS Ver: Kubuntu 23.04
VSCode Ver: VSCodium 1.82.2

Description of problem

When opening the P2 Spin Hexagon top source file (attached hexagon.spin) with the extension enabled, the VSC editor freezes or becomes very slow (controls such as switching to a different tab function as normal). Without the extension loaded, this doesn't happen, but it immediately starts freezing again when enabling the extension.
hexagon-2023-09-24.zip

Additional information

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.