Skip to content

LairdCP/smartBASIC-VS-Code-language-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartBASIC Language Extension for Visual Studio Code

A Visual Studio Code extension with syntax highlighting for Laird Connectivity's SmartBASIC language.

SmartBASIC

Laird Connectivity’s smartBASIC is an event-driven programming language that was designed to make BLE technology development quicker and simpler, vastly cutting down time to market. A simple smartBASIC application encapsulates the complete end-to-end process of reading, writing, and processing sensor data as well as advertising, connecting, security, power management, and wireless status. See https://www.lairdconnect.com/wireless-modules/bluetooth-modules for more information.

Language Extension

Syntax Highlighting

Laird provides syntax highlighting files for Notepad++ (Windows) and Textpad (Mac OSX) along with their regular module firmware versiosn releases. This VS Code language extension is based on the latest Notepad++ syntax files for BL652, BL653 and BL654. Other than the original syntax files from Laird, which cover only the language scope of each module's SmartBASIC implementation, this language extension is a superset of these scopes.

The drawback of this implementation is, that when working on e.g. a BL652 module, VS Code would also highlight SmartBASIC functions, which are only available on the higher-end BL653 or BL654 modules. The advantage is, that you only need one syntax file and no need to switch syntax files when working with different modules in parallel.

Snippets

Snippets were contributed by cvanbeek13. To add a snippet, start typing the snippet prefix. VS Code will list it as an auto-fill option:

image

Clicking enter on the snippet will insert it. You then can fill out the fields, clicking tab after each to fill in additional data (such as name, args, and return_val here).

image

Code Folding

cvanbeek13 also contributed code folding, so you can collapse sections/blocks of code. E.g. a for loop:

image

gets collapsed like this:

image

File Recognition

SmartBASIC files are usually given names with suffix .sb or .sblib. This language extension recognizes both.

Manual Installation

Place the full folder cloned from this repository in the VS Code extensions folder at

  • Windows: %USERPROFILE%\.vscode\extensions
  • MaxOS/Linux: ~/.vscode/extensions

Might require a restart of VS Code.

Install with Extension Manager

This extension is not yet available through the extension manager.

License

This package is licensed under the MIT License.

About

SmartBASIC Language Extension for Visual Studio Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •