{
  "_id": "@codemirror/lang-jinja",
  "maintainers": [
    {
      "name": "marijn",
      "email": "marijn@haverbeke.berlin"
    }
  ],
  "keywords": [
    "editor",
    "code"
  ],
  "dist-tags": {
    "latest": "6.0.1"
  },
  "author": {
    "name": "Marijn Haverbeke",
    "email": "marijn@haverbeke.berlin",
    "url": "http://marijnhaverbeke.nl"
  },
  "_rev": "3-db573a5e4bcb4ed3e922f9b872b9b007",
  "description": "Jinja template support for the CodeMirror code editor",
  "readme": "**This repository has moved to https://code.haverbeke.berlin/codemirror/lang-jinja**\n\n<!-- NOTE: README.md is generated from src/README.md -->\n\n# @codemirror/lang-jinja [![NPM version](https://img.shields.io/npm/v/@codemirror/lang-jinja.svg)](https://www.npmjs.org/package/@codemirror/lang-jinja)\n\n[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://code.haverbeke.berlin/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/) | [**CHANGELOG**](https://code.haverbeke.berlin/codemirror/lang-jinja/src/branch/main/CHANGELOG.md) ]\n\nThis package implements [Jinja\ntemplate](https://jinja.palletsprojects.com/en/stable/templates/)\nsupport for the [CodeMirror](https://codemirror.net/) code editor.\n\nThe [project page](https://codemirror.net/) has more information, a\nnumber of [examples](https://codemirror.net/examples/) and the\n[documentation](https://codemirror.net/docs/).\n\nThis code is released under an\n[MIT license](https://code.haverbeke.berlin/codemirror/lang-jinja/tree/main/LICENSE).\n\nWe aim to be an inclusive, welcoming community. To make that explicit,\nwe have a [code of\nconduct](http://contributor-covenant.org/version/1/1/0/) that applies\nto communication around the project.\n\n## Usage\n\n```javascript\nimport {EditorView, basicSetup} from \"codemirror\"\nimport {jinja} from \"@codemirror/lang-jinja\"\n\nconst view = new EditorView({\n  parent: document.body,\n  doc: `{% if a.active %}{{ a.title }}{% endif %}`,\n  extensions: [basicSetup, jinja()]\n})\n```\n\n## API Reference\n\n<dl>\n<dt id=\"user-content-jinja\">\n  <code><strong><a href=\"#user-content-jinja\">jinja</a></strong>(<a id=\"user-content-jinja^config\" href=\"#user-content-jinja^config\">config</a>&#8288;?: <a href=\"#user-content-jinjacompletionconfig\">JinjaCompletionConfig</a> &amp; <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\">Object</a> = {}) → <a href=\"https://codemirror.net/docs/ref#language.LanguageSupport\">LanguageSupport</a></code></dt>\n\n<dd><p>Jinja template support.</p>\n</dd>\n<dt id=\"user-content-jinjalanguage\">\n  <code><strong><a href=\"#user-content-jinjalanguage\">jinjaLanguage</a></strong>: <a href=\"https://codemirror.net/docs/ref#language.LRLanguage\">LRLanguage</a></code></dt>\n\n<dd><p>A language provider for Jinja templates.</p>\n</dd>\n<dt id=\"user-content-jinjacompletionconfig\">\n  <h4>\n    <code>type</code>\n    <a href=\"#user-content-jinjacompletionconfig\">JinjaCompletionConfig</a></h4>\n</dt>\n\n<dd><p>Configuration options to\n<a href=\"#user-content-jinjacompletionsource\"><code>jinjaCompletionSource</code></a>.</p>\n<dl><dt id=\"user-content-jinjacompletionconfig.tags\">\n  <code><strong><a href=\"#user-content-jinjacompletionconfig.tags\">tags</a></strong>&#8288;?: readonly <a href=\"https://codemirror.net/docs/ref#autocomplete.Completion\">Completion</a>[]</code></dt>\n\n<dd><p>Adds additional completions when completing a Jinja tag.</p>\n</dd><dt id=\"user-content-jinjacompletionconfig.variables\">\n  <code><strong><a href=\"#user-content-jinjacompletionconfig.variables\">variables</a></strong>&#8288;?: readonly <a href=\"https://codemirror.net/docs/ref#autocomplete.Completion\">Completion</a>[]</code></dt>\n\n<dd><p>Add additional global variables.</p>\n</dd><dt id=\"user-content-jinjacompletionconfig.properties\">\n  <code><strong><a href=\"#user-content-jinjacompletionconfig.properties\">properties</a></strong>&#8288;?: fn(<a id=\"user-content-jinjacompletionconfig.properties^path\" href=\"#user-content-jinjacompletionconfig.properties^path\">path</a>: readonly <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\">string</a>[], <a id=\"user-content-jinjacompletionconfig.properties^state\" href=\"#user-content-jinjacompletionconfig.properties^state\">state</a>: <a href=\"https://codemirror.net/docs/ref#state.EditorState\">EditorState</a>, <a id=\"user-content-jinjacompletionconfig.properties^context\" href=\"#user-content-jinjacompletionconfig.properties^context\">context</a>: <a href=\"https://codemirror.net/docs/ref#autocomplete.CompletionContext\">CompletionContext</a>) → readonly <a href=\"https://codemirror.net/docs/ref#autocomplete.Completion\">Completion</a>[]</code></dt>\n\n<dd><p>Provides completions for properties completed under the given\npath. For example, when completing <code>user.address.</code>, <code>path</code> will\nbe <code>[&quot;user&quot;, &quot;address&quot;]</code>.</p>\n</dd></dl>\n\n</dd>\n<dt id=\"user-content-jinjacompletionsource\">\n  <code><strong><a href=\"#user-content-jinjacompletionsource\">jinjaCompletionSource</a></strong>(<a id=\"user-content-jinjacompletionsource^config\" href=\"#user-content-jinjacompletionsource^config\">config</a>&#8288;?: <a href=\"#user-content-jinjacompletionconfig\">JinjaCompletionConfig</a> = {}) → fn(<a id=\"user-content-jinjacompletionsource^returns^context\" href=\"#user-content-jinjacompletionsource^returns^context\">context</a>: <a href=\"https://codemirror.net/docs/ref#autocomplete.CompletionContext\">CompletionContext</a>) → <a href=\"https://codemirror.net/docs/ref#autocomplete.CompletionResult\">CompletionResult</a> | <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\">null</a></code></dt>\n\n<dd><p>Returns a completion source for jinja templates. Optionally takes\na configuration that adds additional custom completions.</p>\n</dd>\n<dt id=\"user-content-closepercentbrace\">\n  <code><strong><a href=\"#user-content-closepercentbrace\">closePercentBrace</a></strong>: <a href=\"https://codemirror.net/docs/ref#state.Extension\">Extension</a></code></dt>\n\n<dd><p>This extension will, when the user types a <code>%</code> between two\nmatching braces, insert two percent signs instead and put the\ncursor between them.</p>\n</dd>\n</dl>\n",
  "repository": {
    "type": "git",
    "url": "git+https://code.haverbeke.berlin/codemirror/lang-jinja.git"
  },
  "license": "MIT",
  "versions": {
    "6.0.0": {
      "name": "@codemirror/lang-jinja",
      "version": "6.0.0",
      "keywords": [
        "editor",
        "code"
      ],
      "author": {
        "url": "http://marijnhaverbeke.nl",
        "name": "Marijn Haverbeke",
        "email": "marijn@haverbeke.berlin"
      },
      "license": "MIT",
      "_id": "@codemirror/lang-jinja@6.0.0",
      "maintainers": [
        {
          "name": "adrianheine",
          "email": "mail@adrianheine.de"
        },
        {
          "name": "marijn",
          "email": "marijn@haverbeke.berlin"
        }
      ],
      "homepage": "https://github.com/codemirror/lang-jinja#readme",
      "bugs": {
        "url": "https://github.com/codemirror/lang-jinja/issues"
      },
      "dist": {
        "shasum": "cc02cd1e45d1fed1226e3c3b44615503f794c904",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@codemirror/lang-jinja/-/lang-jinja-6.0.0.tgz",
        "fileCount": 8,
        "integrity": "sha512-47MFmRcR8UAxd8DReVgj7WJN1WSAMT7OJnewwugZM4XiHWkOjgJQqvEM1NpMj9ALMPyxmlziEI1opH9IaEvmaw==",
        "signatures": [
          {
            "sig": "MEUCIQCi9l6pydDQ+NP2e2aoy6EGc+z+bxIbjKo8pNTAD7pWXQIgBhLR2YYxbTDr7CWYulVmRX5pqRClUTECmgQdN4ofCqs=",
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
          }
        ],
        "unpackedSize": 67553
      },
      "main": "dist/index.cjs",
      "type": "module",
      "types": "dist/index.d.ts",
      "module": "dist/index.js",
      "exports": {
        "import": "./dist/index.js",
        "require": "./dist/index.cjs"
      },
      "gitHead": "aa93ae81a30b182017bf7d03e903f90d6981907a",
      "scripts": {
        "test": "cm-runtests",
        "prepare": "cm-buildhelper src/jinja.ts"
      },
      "_npmUser": {
        "name": "marijn",
        "email": "marijn@haverbeke.berlin"
      },
      "repository": {
        "url": "git+https://github.com/codemirror/lang-jinja.git",
        "type": "git"
      },
      "_npmVersion": "11.3.0",
      "description": "Jinja template support for the CodeMirror code editor",
      "directories": {},
      "sideEffects": false,
      "_nodeVersion": "22.14.0",
      "dependencies": {
        "@lezer/lr": "^1.4.0",
        "@lezer/common": "^1.2.0",
        "@lezer/highlight": "^1.2.0",
        "@codemirror/language": "^6.0.0",
        "@codemirror/lang-html": "^6.0.0"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "@lezer/generator": "^1.7.0",
        "@codemirror/buildhelper": "^1.0.0"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/lang-jinja_6.0.0_1748879654749_0.25627242415592666",
        "host": "s3://npm-registry-packages-npm-production"
      }
    },
    "6.0.1": {
      "name": "@codemirror/lang-jinja",
      "version": "6.0.1",
      "description": "Jinja template support for the CodeMirror code editor",
      "scripts": {
        "test": "cm-runtests",
        "prepare": "cm-buildhelper src/jinja.ts"
      },
      "keywords": [
        "editor",
        "code"
      ],
      "author": {
        "name": "Marijn Haverbeke",
        "email": "marijn@haverbeke.berlin",
        "url": "http://marijnhaverbeke.nl"
      },
      "type": "module",
      "main": "dist/index.cjs",
      "exports": {
        "import": "./dist/index.js",
        "require": "./dist/index.cjs"
      },
      "types": "dist/index.d.ts",
      "module": "dist/index.js",
      "sideEffects": false,
      "license": "MIT",
      "dependencies": {
        "@codemirror/autocomplete": "^6.0.0",
        "@codemirror/lang-html": "^6.0.0",
        "@codemirror/language": "^6.0.0",
        "@codemirror/state": "^6.0.0",
        "@codemirror/view": "^6.0.0",
        "@lezer/lr": "^1.4.0",
        "@lezer/common": "^1.2.0",
        "@lezer/highlight": "^1.2.0"
      },
      "devDependencies": {
        "@codemirror/buildhelper": "^1.0.0",
        "@lezer/generator": "^1.7.0"
      },
      "repository": {
        "type": "git",
        "url": "git+https://code.haverbeke.berlin/codemirror/lang-jinja.git"
      },
      "gitHead": "e317d9b9da2ab0e04ad8f181348870ca44c18e1c",
      "_id": "@codemirror/lang-jinja@6.0.1",
      "_nodeVersion": "22.20.0",
      "_npmVersion": "11.9.0",
      "dist": {
        "integrity": "sha512-P5kyHLObzjtbGj16h+hyvZTxJhSjBEeSx4wMjbnAf3b0uwTy2+F0zGjMZL4PQOm/mh2eGZ5xUDVZXgwP783Nsw==",
        "shasum": "01d128a7e0756b2714cd453ad16c1dffb20188f0",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@codemirror/lang-jinja/-/lang-jinja-6.0.1.tgz",
        "fileCount": 8,
        "unpackedSize": 67910,
        "signatures": [
          {
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
            "sig": "MEQCIAM0jp1rvhCPWCIdbsN3tO7zfCpwdHSi1OhSiOjFyaa1AiAlb3D5GPAfilYggRzLtSPDqZwbAER2FGHiHGTtihoL0w=="
          }
        ]
      },
      "_npmUser": {
        "name": "marijn",
        "email": "marijn@haverbeke.berlin"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "marijn",
          "email": "marijn@haverbeke.berlin"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages-npm-production",
        "tmp": "tmp/lang-jinja_6.0.1_1776341998129_0.5132860561474737"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "@codemirror/lang-jinja",
  "time": {
    "created": "2025-06-02T15:54:14.615Z",
    "modified": "2026-05-06T08:25:10.232Z",
    "6.0.0": "2025-06-02T15:54:14.923Z",
    "6.0.1": "2026-04-16T12:19:58.311Z"
  },
  "readmeFilename": "README.md"
}