{"id":14981773,"url":"https://github.com/uros-5/jinja-lsp","last_synced_at":"2025-04-12T18:52:40.161Z","repository":{"id":215776648,"uuid":"725215365","full_name":"uros-5/jinja-lsp","owner":"uros-5","description":"Language Server for jinja","archived":false,"fork":false,"pushed_at":"2025-03-16T18:41:34.000Z","size":4711,"stargazers_count":109,"open_issues_count":6,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T00:02:05.660Z","etag":null,"topics":["helix","jinja","jinja2","lsp","minijinja","nvim","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/jinja-lsp","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uros-5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-29T17:15:04.000Z","updated_at":"2025-03-31T04:39:59.000Z","dependencies_parsed_at":"2024-04-12T08:37:56.515Z","dependency_job_id":"cfbf5842-de29-4be0-a7c6-bc66d774659b","html_url":"https://github.com/uros-5/jinja-lsp","commit_stats":{"total_commits":111,"total_committers":4,"mean_commits":27.75,"dds":0.5405405405405406,"last_synced_commit":"1c731b5783ab72a774eac6977909c43c66e89085"},"previous_names":["uros-5/jinja-lsp"],"tags_count":15,"template":false,"template_full_name":"IWANABETHATGUY/tower-lsp-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uros-5%2Fjinja-lsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uros-5%2Fjinja-lsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uros-5%2Fjinja-lsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uros-5%2Fjinja-lsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uros-5","download_url":"https://codeload.github.com/uros-5/jinja-lsp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618243,"owners_count":21134200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helix","jinja","jinja2","lsp","minijinja","nvim","rust"],"created_at":"2024-09-24T14:04:14.378Z","updated_at":"2025-04-12T18:52:40.136Z","avatar_url":"https://github.com/uros-5.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/banner.png\" alt=\"banner\" /\u003e\n\njinja-lsp enhances minijinja development experience by providing Helix/Nvim users with advanced features such as autocomplete, syntax highlighting, hover, goto definition, code actions and linting.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://crates.io/crates/jinja-lsp\"\u003e\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/jinja-lsp.svg?style=for-the-badge\u0026color=fdbb39\u0026logo=rust\" height=\"20\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=urosmrkobrada.jinja-lsp\"\u003e\u003cimg alt=\"visualstudio.com\" src=\"https://vsmarketplacebadges.dev/version/urosmrkobrada.jinja-lsp.svg?color=007ACC\" height=\"20\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Installation\n\n```sh\ncargo install jinja-lsp\n```\n\n\n## Features\n\n### Autocomplete\n\nIntelligent suggestions for variables in current template, as well as variables, templates and filters defined on backend side.\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/completion.png\" alt=\"\" /\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/completion2.png\" alt=\"\" /\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/completion3.png\" alt=\"\" /\u003e\n\n### Linting\n\nHighlights errors and potential bugs in your jinja templates.  \n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/diagnostics1.png\" alt=\"\" /\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/diagnostics2.png\" alt=\"\" /\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/diagnostics3.png\" alt=\"\" /\u003e\n\n### Hover Preview\n\nSee the complete filter or variable description by hovering over it.\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/hover.png\" alt=\"\" /\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/hover2.png\" alt=\"\" /\u003e\n\n### Code Actions\n\nIt's recommended to reset variables on server in case you rename/delete file.\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/code_actions.png\" alt=\"\" /\u003e\n\n### Goto Definition\n\nQuickly jump to definition. Works for Rust identifiers as well. \n\nhttps://github.com/uros-5/jinja-lsp/assets/59397844/015e47b4-b6f6-47c0-8504-5ce79ebafb00\n\n### Snippets\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/snippets.png\" alt=\"\" /\u003e\n\n### Document symbols\n\n\u003cimg src=\"https://raw.githubusercontent.com/uros-5/jinja-lsp/main/.github/document_symbols.png\" alt=\"\" /\u003e\n\n## Configuration\n\nLanguage server configuration\n\n```json\n{ \"templates\": \"./TEMPLATES_DIR\", \"backend\": [\"./BACKEND_DIR\"], \"lang\": \"rust\"}\n````\n\nHelix configuration\n\n```toml\n[language-server.jinja-lsp]\ncommand = \"jinja-lsp\"\nconfig = { templates = \"./templates\", backend = [\"./src\"], lang = \"rust\"}\ntimeout = 5\n\n[[language]]\nname = \"jinja\"\nlanguage-servers = [\"jinja-lsp\"]\n```\n\nNeovim configuration\n\n```lua\nvim.filetype.add {\n  extension = {\n    jinja = 'jinja',\n    jinja2 = 'jinja',\n    j2 = 'jinja',\n  },\n}\n\n-- if you want to debug\nvim.lsp.set_log_level(\"debug\")\n\nlocal nvim_lsp = require('lspconfig')\nlocal configs = require('lspconfig.configs')\n\nif not configs.jinja_lsp then\nconfigs.jinja_lsp = {\n  default_config = {\n    name = \"jinja-lsp\",\n    cmd = { 'path_to_lsp_or_command' },\n    filetypes = { 'jinja', 'rust' },\n    root_dir = function(fname)\n      return \".\"\n      --return nvim_lsp.util.find_git_ancestor(fname)\n    end,\n    init_options = {\n      templates = './templates',\n      backend = { './src' },\n      lang = \"rust\"\n    },\n},\n}\nend\nlocal capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())\nnvim_lsp.jinja_lsp.setup {\n  capabilities = capabilities\n}\nnvim_lsp.jinja_lsp.setup {\n}\n```\n\nYou can also write configuration in: `pyproject.toml`, `Cargo.toml`, `jinja-lsp.toml`.\n\n```toml\n[jinja-lsp]\ntemplates = \"./templates\"\nbackend = [\"./src\"]\nlang = \"rust\"\n```\n\nSupported languages: Python, Rust\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furos-5%2Fjinja-lsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furos-5%2Fjinja-lsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furos-5%2Fjinja-lsp/lists"}