Files
openidea/languages/django-html.toml
T
l0ng-ai c9c75fa3b7 feat(django): Django Template LSP for template tags, filters, templates and URL names (#3696)
Django Template files start djlsp (django-template-lsp, installed into its own
virtualenv on request) next to the HTML language server: completion, hover and
Go to Declaration for the project's template tags, filters, template names,
static files and URL names. The project interpreter's environment is passed as
its env_directories, so a virtualenv, conda or pixi environment outside the
project root is used too.

Refs #2581
2026-11-16 14:44:46 +08:00

33 lines
1.1 KiB
TOML

id = "django-html"
name = "Django Template"
extensions = ["djhtml"]
block-comment = ["{#", "#}"]
indent = { tab-size = 2, insert-spaces = true }
ui-mode = "Django Template"
tree-sitter = "html"
# Django projects: the HTML and text files in a `templates` folder.
[[framework-files]]
folder = "templates"
extensions = ["html", "txt"]
root-markers = ["manage.py"]
# The markup between the template tags: completion and hover of tags and
# attributes. The template tags are text to it. No formatter: HTML formatters
# reflow template tags.
[[language-servers]]
name = "vscode-html-language-server"
command = "vscode-html-language-server"
args = ["--stdio"]
initialization-options = { embeddedLanguages = { css = true, javascript = true } }
install-hint = "npm i -g vscode-langservers-extracted"
# Template tags, filters, template names and URL names of the project: completion,
# hover and go to definition. It reads them by running Django with the project
# interpreter.
[[language-servers]]
name = "djlsp"
command = "djlsp"
root-markers = ["manage.py"]
install-hint = "uv tool install django-template-lsp (or: pip install django-template-lsp)"