aboutsummaryrefslogtreecommitdiff
path: root/assets/outbox/pyright-and-django-stubs.txt
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-03-07 11:28:56 -0600
committerCraig Jennings <c@cjennings.net>2026-03-07 11:28:56 -0600
commit02a51e15938e8aa1defbe6c5b5e99ba53e193c62 (patch)
treebdb3eedf4b9c6c0fa589904698e07b78ac760d22 /assets/outbox/pyright-and-django-stubs.txt
parent49afe5636fb1f97e098abefbf91ff0fca194cba3 (diff)
downloadarchsetup-02a51e15938e8aa1defbe6c5b5e99ba53e193c62.tar.gz
archsetup-02a51e15938e8aa1defbe6c5b5e99ba53e193c62.zip
chore: update calibre, mimeapps, authinfo, add outbox items
Calibre window geometry and scheduler updates. Add Signal URI handlers. Move processed inbox items to outbox.
Diffstat (limited to 'assets/outbox/pyright-and-django-stubs.txt')
-rw-r--r--assets/outbox/pyright-and-django-stubs.txt48
1 files changed, 48 insertions, 0 deletions
diff --git a/assets/outbox/pyright-and-django-stubs.txt b/assets/outbox/pyright-and-django-stubs.txt
new file mode 100644
index 0000000..a9fcd90
--- /dev/null
+++ b/assets/outbox/pyright-and-django-stubs.txt
@@ -0,0 +1,48 @@
+pyright and django-stubs
+========================
+
+WHY
+---
+Emacs is configured to use pyright as the Python LSP server (via lsp-pyright)
+instead of pylsp. Pyright has significantly better type inference, especially
+for Django's dynamic attributes (model fields, querysets, managers). With
+django-stubs, pyright understands the Django ORM well enough to provide
+accurate completions and type checking on QuerySets, Model.objects, request
+objects, etc.
+
+PYRIGHT (language server - system-wide tool)
+--------------------------------------------
+Install via pacman, NOT pip:
+
+ sudo pacman -S pyright
+
+Pyright is already in the Arch extra repo. Do not use pip or pipx for this —
+pacman keeps it updated with the rest of the system.
+
+DJANGO-STUBS (per-project, in the project venv)
+------------------------------------------------
+django-stubs provides type stubs for Django so pyright understands Django's
+dynamic attributes. Install inside each Django project's virtual environment:
+
+ pip install django-stubs
+
+This must be installed per-project (not globally) because it needs to match
+the Django version in use. Also add to requirements-dev.txt or pyproject.toml
+so other developers get it automatically.
+
+Also requires a pyrightconfig.json at the project root with:
+
+ {
+ "plugins": ["django-stubs"]
+ }
+
+Or if using pyright's djangoStubs setting directly:
+
+ {
+ "djangoStubs": true
+ }
+
+SUMMARY
+-------
+- pyright: pacman (system tool, installed once)
+- django-stubs: pip in venv (per Django project)