renzmann / treesit-auto

Automatic installation, usage, and fallback for tree-sitter major modes in Emacs 29
GNU General Public License v3.0
353 stars 27 forks source link

Fix treesit-auto-add-to-auto-mode-alist when langs is nil #67

Closed arkbriar closed 8 months ago

arkbriar commented 8 months ago

(listp langs) return t when langs is nil. It results in empty recipes so nothing's really added.

listp is a built-in function in ‘C source code’.

(listp OBJECT)

Return t if OBJECT is a list, that is, a cons cell or nil. Otherwise, return nil.

I believe this should also fix https://github.com/renzmann/treesit-auto/issues/66.

BTW, thanks for such a great package xD