Before, when developing Django-based projects, I often use VS Code. Because VS Code is heavier and heavier (the installation is 1 GiB now), I need to move away from it. But the first thing is to find an independent LSP server that work well enough with Django. VS Code comes with Pylance, its LSP server for Python. But Pylance is proprietary, so for other code editor, I need a different solution.
When we do programming, LSP servers are great softwares. They help improve productivity by enabling accurate autocomplete in code editor, allowing us to code faster and make less mistakes. They works best with languages having strong type system (Rust and functional programming languages, like Gleam), because the type system let us know at a point, this variable is of which type and has which members. For dynamical type languages, LSP servers often base on a static type checkers (because both need to draw type information from the source code). For Python, the situation is a bit hard, because Python is so dynamic and flexible that, its type annotations cannot cover all the case to help type checkers and LSP servers infer the type of variables. It is especially true for Django. At the time of writing, Mypy is the type checker that supports Django the best. It means that, for LSP server side, we need someone that can take advantage of Mypy. Currently, there are many type checkers + LSP servers for Python, most of them are not written in Python:
- Pyright: Written in TypeScript.


