BlitzMax VSCode extension

Started by Hezkore, June 04, 2019, 19:38:43

Previous topic - Next topic

Hezkore

BlitzMax extension for Visual Studio Code





Build and code your BlitzMax NG or Legacy applications in VSCode.
The extension and VSCode are both free to use, easy to install, and available for Windows, Linux and Mac.


Installation is easy
Just open any .bmx file and VSCode will guide you through the extension installation.
You can also manually install it via the marketplace: marketplace-hezkore.blitzmax
Or enter the command (Ctrl + P) ext install Hezkore.blitzmax in VSCode.
And feel free to fork the extension on GitHub: vscode-blitzmax-support

Getting started with VSCode
VSCode might look scary, but is only as advanced as you want it to be.
Here's an introduction page that gives you a quick start.

Features
VSCode has some excellent features, like Snippets and the Code Outliner, and most of them are supported by the extension.
The extension also comes packed with features unique to BlitzMax, like the Module Example Viewer and Quick Build Buttons.
You can read more about the features on the official GitHub repo.

Additional information
Changelog: Read on Marketplace
Troubleshooting and FAQ: Read on Marketplace
Worklog: Read on SyntaxBomb
Issues: Report on GitHub
Questions: Discord or Telegram

Don't forget to rate or review: Rate on Marketplace
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

Hezkore

#1
Features

       
  • Syntax Highlighting (One Monokai Theme)
  • Per-Project BlitzMax Installation
  • Build Tasks
  • Module Auto-Complete
  • Problem Detection
  • Snippets
  • View Module Examples
  • View Module Definitions
  • Code Outliner
  • Quick Build Buttons
  • Guided Install

I'll probably never be able to implement proper debugging and other similar things.
So I'm asking YOU to head over to GitHub, fork the extension, and help this project grow!
GitHub Link: vscode-blitzmax-support
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

fielder

Quote from: Hezkore on June 08, 2019, 17:49:09
The new 1.1.0 update lets you easily build stuff, without having to mess with any json files.
Just hit Ctrl + Shift + B and select how you want to build. :)
Great Job!

Hezkore

#3
Thanks!

I'm hoping someone with actual VSCode knowledge can help me out sooner or later heh.
I've not used VSCode all that much, and I've never written anything in TypeScript (nor JS) before.
But I feel like this could be something really great if we keep working on it!

In the meantime; I'll keep adding smaller features.
I've added a right click menu option for files, so that you can easily lock them as the build file.
And you can now just press F5 to quickly build your application.
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

fielder

Quote from: Hezkore on June 13, 2019, 23:00:53
Thanks!
i think that a small youtube video about creating the workspace/project and an Hello word application can be a nice starting point to use VSCode.

Hezkore

#5
Quotei think that a small youtube video about creating the workspace/project and an Hello word application can be a nice starting point to use VSCode.

Here's how your very first BlitzMax project in VSCode might be setup.
It assumes you don't have the BlitzMax extension installed, nor configured.
If you DO have the extension installed; all you have to do is create a folder, a file and hit F5.



You now have a workspace setup and ready to use!
VSCode will store all your settings and tasks inside a '.vscode' folder for you.
You don't have to worry about any of that though, the extension does it all for you.

Some Workspace related things:
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

Hezkore

#6
I've opened a worklog for this project over at: https://www.syntaxbomb.com/index.php/topic,5824.0.html
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

GW

Just tried it out.  Looks great!

Hezkore

Awesome, thanks! :)

Give the new version a go. (it'll auto-update)
It will now auto-complete commands from your BMax modules.
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

fielder

i'm using it with Blitzmax NG.. 64 bit Win build... seems that i'm unbale to build a RELEASE... only DEBUG versions. (i switched the release/debug setting... but pressing F5 i can compile only debug versions)

Hezkore

#10
Quote from: fielder on July 03, 2019, 08:16:03
i'm using it with Blitzmax NG.. 64 bit Win build... seems that i'm unbale to build a RELEASE... only DEBUG versions. (i switched the release/debug setting... but pressing F5 i can compile only debug versions)

Pressing F5 in VSCode will always start debugging. https://code.visualstudio.com/docs/getstarted/keybindings#_debug
And pressing Ctrl + Shift + B will present you with your build tasks. https://code.visualstudio.com/docs/getstarted/keybindings#_tasks

So just hit Ctrl + Shift + B and all of your options will be applied, and you'll have a proper build. :)

(debugging isn't properly implemented according to the VSCode rules yet)
Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

fielder

Thank you :) in future can be possible the if/endif matching?

chalky

#12
It's VERY likely I'm being a numpty here, but whenever I open a folder and load a bmx file, I get: Error executing BMK: 'bcc' is not recognized as an internal or external command, operable program or batch file.

I also get BlitzMax documentation needs to be rebuilt every time I load a bmx file from the EXPLORER pane.

I think I have set everything up correctly, but - as already suggested - numptiness could very well be the cause for the all of the above...

Hezkore

#13
Quote from: fielder on July 04, 2019, 07:29:12
Thank you :) in future can be possible the if/endif matching?

I'll see what I can do.
The problem with stuff like that is that VSCode expects languages to be case-sensitive.
So I'd have to add cases for `if/IF/If/iF` and match it against a lot of different `EndIf`.

QuoteIt's VERY likely I'm being a numpty here, but whenever I open a folder and load a bmx file, I get: Error executing BMK: 'bcc' is not recognized as an internal or external command, operable program or batch file.

I also get BlitzMax documentation needs to be rebuilt every time I load a bmx file from the EXPLORER pane.

I think I have set everything up correctly, but - as already suggested - numptiness could very well be the cause for the all of the above...

Hmm it sounds like your BlitzMax path isn't correctly set in your user settings.
Hop into your settings, make sure you're in `user` and not in `workspace` (workspace won't show if you have none open), then navigate to extensions and you'll find BlitzMax.
The path should point to your BlitzMax root, and not the `bin` folder.

Simplicity is the ultimate sophistication. 🚀
GitHub
BlitzMax for VSCode
BlitzMax for Vim

chalky

Doh - working perfectly now. This is really great - thank you!