8 releases

0.1.80 Apr 5, 2024
0.1.71 Apr 1, 2024
0.1.70 Mar 31, 2024
0.1.4 Jan 6, 2024

#44 in Template engine

Download history 1/week @ 2024-02-13 7/week @ 2024-02-20 21/week @ 2024-02-27 241/week @ 2024-03-05 251/week @ 2024-03-12 139/week @ 2024-03-19 280/week @ 2024-03-26 543/week @ 2024-04-02 165/week @ 2024-04-09 163/week @ 2024-04-16 132/week @ 2024-04-23 137/week @ 2024-04-30 137/week @ 2024-05-07 110/week @ 2024-05-14 139/week @ 2024-05-21

546 downloads per month

MIT license

140KB
3.5K SLoC

banner

jinja-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.

crates.io visualstudio.com

Installation

cargo install jinja-lsp

Features

Autocomplete

Intelligent suggestions for variables in current template, as well as variables, templates and filters defined on backend side.

Linting

Highlights errors and potential bugs in your jinja templates.

Hover Preview

See the complete filter or variable description by hovering over it.

Code Actions

It's recommended to reset variables on server in case you rename/delete file.

Goto Definition

Quickly jump to definition. Works for Rust identifiers as well.

https://github.com/uros-5/jinja-lsp/assets/59397844/015e47b4-b6f6-47c0-8504-5ce79ebafb00

Snippets

Document symbols

Configuration

Language server configuration

{ "templates": "./TEMPLATES_DIR", "backend": ["./BACKEND_DIR"], "lang": "rust"}

Helix configuration

[language-server.jinja-lsp]
command = "jinja-lsp"
config = { templates = "./templates", backend = ["./src"], lang = "rust"}
timeout = 5

[[language]]
name = "jinja"
language-servers = ["jinja-lsp"]

Supported languages: Python, Rust

Dependencies

~21–33MB
~680K SLoC