I’ve been working on a major update to simondotm’s Beeb VSC extension for Visual Studio Code.
When I started using BeebAsm, I found the extension in the marketplace. The syntax highlighting and set-up of build / test tasks was very helpful. I soon found myself wanting other features as my code base grew, especially those that help navigate through a large file or collection of files, so started looking into how to contribute to the extension project.
There is now a version that hopefully is mostly there ready for anyone who would like to try a beta version. I developed it on a Mac but have tried briefly under Windows and it seems okay.
Updates
- Syntax highlighting fixes for numbers and new BeebAsm commands that were added since the current extension was made
- Brought the tasks.json format up-to-date
- Diagnostics i.e. underlining lines with problems (using a TypeScript conversion of parts of BeebAsm to find errors without having to compile)
- Code completions (BeebAsm functions and commands + symbols and labels within the workspace)
- Hover (on opcodes, symbols, labels, functions and commands)
- Function signature information for “intellisense" style hints as you type
- References (goto definition, peek definition, find all references & rename refactoring)
The extension needs to know the initial file that will be sent to BeebAsm so that it can follow INCLUDE links to get the entire code base. Setting this up is the same way as setting up the build task for Beeb VSC i.e. press F10 then select the file (it will offer all files with extension .6502, .asm or .s). Alternatively use the command palette and select “BeebVSC: Create new build target”. This will create a settings.json file local to your workspace folder (in a .vscode folder, the same as tasks.json) with the source file name saved for future reference.
With that set, you should be able to access all the regular VSCode features as listed above.
The beta releases are available to download here: https://github.com/tommy9/beeb-vsc/releases. I’ll add new versions as fixes are made until it is looking good enough to release properly. You should be able to install the .vsix file through the command palette "Extensions: install from VSIX..." or just dragging the file onto the extensions side panel also worked for me.