Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Mongo FormulaNew to Visual Studio Code? Get it now.
Mongo Formula

Mongo Formula

whkwok

|
3,349 installs
| (0) | Free
Provide syntax highlight and utilities for Mongo Formula.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mongo Formula VSCode Extension

Provide syntax highlight and utilities for Mongo Formula.

Features

  • Syntax highlight for Mongo Formula in JavaScript and TypeScript string.

  • Command to insert Mongo Formula with syntax highlight.

  • Command to insert Mongo Expression/Pipeline written in Mongo Formula.

Usages

To enable syntax highlight, you can prepend /* mongo-formula */ before string.

You can execute the insertFormula and insertExpressionOrPipeline commands from the command palette. (Ctrl+Shift+P)

Demo

Settings

mongo-formula.mongoFormulaPath

A custom path to the mongo-formula module. The default path is ${workspaceFolder}/node_modules/mongo-formula. If no module is found, the bundled module will to used.

Parser Configurations

The extension will find the config file under the workspace folder on activation.

The filename of config file is either .mongoformularc.json or .mongoformula.config.json.

The following properties should be defined in the config file.

  • schemas - Dictionary of schemas to be used in the parser.
  • options - Options to be used in the parser.

An example of config file.

{
  "schemas": {
    "user": {
      "name": { "type": "string" },
      "email": { "type": "string" },
      "birthdate": { "type": "date" }
    },
    "pet": {
      "name": { "type": "string" },
      "type": { "type": "string" }
    }
  },
  "options": { "undefinedVarTyp": { "type": "any" } }
}

Release Notes

Refer to CHANGELOG.md

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft