This is on Emacs 29.4. Taking a quick look at master, it seems this hack is gone.

On Sun, Sep 29, 2024 at 3:09 PM Ship Mints <shipmints@gmail.com> wrote:
The c-ts-mode "fake" emacs-c grammar does not work in the presence of a 'c grammar provided in treesit-load-name-override-list.

For example, I set this override to point to my treesitter c grammar which uses the file name "c.dylib" on Mac, not "tree_sitter_c.dylib":

(add-to-list 'treesit-load-name-override-list '(c "c" "tree_sitter_c"))

c-ts-mode says:
(define-derived-mode c-ts-mode c-ts-base-mode "C"
...
    (setf (alist-get 'emacs-c treesit-load-name-override-list)
          '("libtree-sitter-c" "tree_sitter_c"))

I think this code should first look for the 'c grammar in 'treesit-load-name-override-list before setting a hard-coded file name that may not work for everyone.

I can get around this, temporarily, by setting a symlink from c.dylib to libtree-sitter-c.dylib. It took a while to figure out what was going on, though. This is surely going to confuse other people.

Thank you,

Stephane