Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Baobab LanguageNew to Visual Studio Code? Get it now.
Baobab Language

Baobab Language

Baobab

| (0) | Free
Baobab - the French-first programming language. Syntax highlighting, snippets, and Run support for .bao files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Baobab Language Support for VS Code

Baobab is a modern, French-first programming language designed for learning and teaching. This extension brings full support for .bao files to Visual Studio Code.

🌐 Official Website • 📚 Documentation • 💻 Try in Browser


Features

🎨 Syntax Highlighting

Complete syntax coloring for Baobab code:

  • Control flow: si, sinonsi, sinon, pour, tantque, essayer, attraper
  • Declarations: fonction, classe, importer, depuis
  • Operators: et, ou, non, est
  • Constants: vrai, faux, nul
  • Built-ins: afficher, lire, longueur, intervalle, trie, enumerer...
  • Errors: ErreurValeur, ErreurType, ErreurCle, ErreurIndice...
  • Modules: aleatoire, maths

▶️ Run & Debug

  • Run button in the editor title bar (or press Cmd+F5 / Ctrl+F5)
  • Stop button to kill the running program (Shift+F5)
  • Interactive mode - lire() / input() works directly in the terminal
  • Status bar indicator when a .bao file is active

📝 Code Snippets

22 ready-to-use snippets for common patterns:

  • fonction → full function declaration
  • si, pour, tantque → control structures
  • classe → class with nouveau (constructor)
  • essayer → try/catch block
  • avec → context manager (avec ouvrir(...))
  • afficher, lire → I/O shortcuts
  • and more...

Type the keyword and press Tab to expand.

⚙️ Smart Editor Features

  • Auto-indentation after : (function, class, if, loops...)
  • Code folding based on indentation
  • Auto-closing brackets, quotes, and parentheses
  • Comment toggling with Cmd+/

Installation

1. Install the Baobab CLI

The extension requires the bao command-line tool to run .bao files.

With pipx (recommended):

pipx install baobab-lang

With pip:

pip install baobab-lang

Requirements: Python ≥ 3.13

Verify the installation:

bao --version

2. Install the VS Code Extension

Search for "Baobab" in the Extensions view (Cmd+Shift+X) and click Install.

Or install from the command line:

code --install-extension baobablang.baobab-lang

Usage

Running a Baobab Program

  1. Open or create a .bao file
  2. Click the ⚡ Run button in the editor title bar (or press Cmd+F5)
  3. The program runs in the integrated terminal

Interactive programs work out of the box:

nom = lire("Quel est votre nom ? ")
afficher("Bonjour " + nom + " !")

Press Shift+F5 to stop a running program.

Available Commands

Open the Command Palette (Cmd+Shift+P) and search for:

  • Baobab: Run File - run the active .bao file
  • Baobab: Stop - stop the running program
  • Baobab: Open Documentation - open baobablang.dev/docs
  • Baobab: Open Studio (Web IDE) - open baobablang.dev in browser

Keyboard Shortcuts

Action Shortcut
Run file Cmd+F5 / Ctrl+F5
Stop Shift+F5

Extension Settings

Configure the extension in Settings (Cmd+,):

baobab.executablePath

Path to the bao CLI executable.

  • Default: "bao" (assumes bao is on your PATH)
  • Example: "/usr/local/bin/bao" or "/Users/you/.local/bin/bao"

baobab.runInTerminal

Run .bao files in the integrated terminal (supports lire() / input()).

  • Default: true
  • Set to false to use the Output panel instead (non-interactive).

baobab.clearTerminalOnRun

Clear the terminal before each run.

  • Default: false

Example

# fibonacci.bao

fonction fibonacci(n):
    si n <= 0:
        retourner []
    sinonsi n == 1:
        retourner [0]
    suite = [0, 1]
    tantque longueur(suite) < n:
        suite.ajouter(suite[-1] + suite[-2])
    retourner suite

afficher(fibonacci(10))

Output:

[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]

About Baobab

Baobab is a French-first programming language that transpiles to Python. It was designed to make programming accessible to French-speaking learners while maintaining full compatibility with the Python ecosystem.

Key Features

  • 🇫🇷 French keywords - fonction, si, pour, afficher...
  • 🐍 Python-compatible - transpiles to readable Python code
  • 📖 Educational focus - clear error messages, beginner-friendly syntax
  • 🌐 Web IDE - try Baobab instantly at baobablang.dev/ide

Learn More

  • Website: baobablang.dev
  • Documentation: baobablang.dev/docs
  • GitHub: github.com/baobablang
  • Community: Join us on Discord

Troubleshooting

"Code language not supported or defined." or garbled input

This happens when Code Runner tries to run a .bao file. Code Runner does not support interactive programs — it injects text into the terminal that gets read as user input, corrupting programs that use lire().

Always use the Baobab ⚡ button to run .bao files:

  • Click ⚡ in the editor title bar (top right when a .bao file is active)
  • Or press Cmd+F5 (Mac) / Ctrl+F5 (Windows/Linux)
  • Or right-click the file → Baobab: Run File

The Baobab extension automatically redirects Code Runner on .bao files to show a friendly reminder instead of running incorrectly.

"'bao' not found. Install the bao CLI first."

The bao command is not on your PATH. Install it with:

pipx install baobab-lang

Then reload VS Code. If bao is installed but still not found, set the full path in settings:

Cmd+, → search baobab.executablePath → set to the full path (e.g. /Users/you/.local/bin/bao).


Support

Found a bug? Open an issue

Questions? Visit our documentation or join the community.


License

MIT License - see LICENSE for details.

Made with 🌳 by the Baobab team.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft