<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-prog-python--lsp-guard.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-07-14T05:24:34+00:00</updated>
<entry>
<title>fix(prog-python): keep the pyright guard authoritative for LSP attach</title>
<updated>2026-07-14T05:24:34+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-14T05:24:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=bcd26c73b0efd857b78096a2351f4b782a0e0673'/>
<id>urn:sha1:bcd26c73b0efd857b78096a2351f4b782a0e0673</id>
<content type='text'>
lsp-pyright's :hook lambda called require and lsp-deferred unguarded on every python-ts buffer, so a machine without pyright still got the LSP attach prompt that cj/python-setup's guard exists to prevent. The guarded branch now owns the require and the attach, and the hook is gone.

Classic python-mode now runs the same setup hooks as python-ts-mode, so treesit-auto's grammar-unavailable fallback keeps indentation, keys, and LSP. Four tests cover the guard branches and pin that every python hook entry stays a named function.
</content>
</entry>
</feed>
