django-language-server¶
A language server for the Django web framework.
Warning
This project is in early stages. All Most features are incomplete and missing.
Features¶
- Completions - Template tag and filter autocompletion with snippets

- Diagnostics - Real-time error checking and validation

- Go to definition - Jump to template, block, or variable definitions
- Template navigation for
{% extends %}and{% include %} - Block and variable definitions
- Template navigation for
- Find references - See where templates, blocks, and variables are used
- Template references for
{% extends %}and{% include %} - Block and variable references
- Template references for
- Folding ranges - Fold Django template regions

- Hover - View documentation for Django template tags, filters, libraries, and template references

- Rename - Refactor names across files
- Code actions - Quick fixes and refactorings
- Document symbols - Outline view of template structure
- Workspace symbols - Search across all project templates
- Signature help - Parameter hints while typing
Getting Started¶
Set up your editor's LSP client to run the server:
- VS Code - Install the extension from the marketplace
- Neovim - Configure with
vim.lsp.config() - Sublime Text - Set up with LSP package
- Zed - Install the extension
See all client configurations.
Most editors can use uvx --from django-language-server djls serve to run the server on-demand without installing it. Alternatively, install it globally first:
See the Installation guide for more options including pip, standalone binaries, and building from source.
Once configured, open any Django template file in your project to get:
- Template tag and filter completions with snippets
- Real-time syntax validation and diagnostics
- Hover documentation for template tags, filters, libraries, and template references
- Navigation to template definitions and references
- Folding for Django template regions
- Outline symbols for template structure