The VS Code NaC extension provides rich language support for the NaC programming language.
- Visual Studio Code 1.80 or newer.
- NaC Language Runtime installed on your system.
Welcome! 👋🏻 Whether you are new to NaC or an experienced developer, we hope this extension enhances your development experience.
- Install NaC from the official installation page if you haven't already.
- Install the VS Code NaC extension from the Marketplace.
- Open any
.nacfile to automatically activate the extension. The NaC status bar will appear in the bottom right corner of the window.
You are ready to NaC :-) 🚀🚀🚀
- Syntax Highlighting - Vivid colors for keywords, strings, and numeric values.
- IntelliSense - Highlighting for built-in functions like
http,out, and math utilities. - Code Navigation - Support for code folding to manage large logic blocks.
- Editing Support - Automatic bracket matching and comment toggling (
//).
- Explore the NaC Language Documentation to learn about syntax and built-in functions.
- Check out the Example section below to see NaC in action.
- If you encounter any bugs, please file an issue on our GitHub repository.
// HTTP GET request example
http("GET", "https://api.ipify.org/?format=json");
// Fibonacci function definition
fn fibonacci(n) {
if(n <= 1) {
rn n;
};
rn fibonacci(n-1) + fibonacci(n-2);
};
// Using 'out' for console output
out(fibonacci(10));
Syntax highlighting is not working:
- Ensure the file extension is strictly
.nac. - Restart VS Code to refresh the extension host.
- Check the bottom-right corner to ensure "NaC" is the active language mode.
Extension is not appearing:
- Verify that the extension is correctly placed in your
.vscode/extensionsfolder. - Check that your
package.jsonfile is valid and follows the VS Code extension schema.