Simplify error reported by loading tree-sitter language definition
Before:
Error: Cannot load language definition:
"javascript",
("/home/jostein/.emacs.d/tree-sitter/libtree-sitter-javascript:
cannot open shared object file: No such file or directory"
"/home/jostein/.emacs.d/tree-sitter/libtree-sitter-javascript.so:
cannot open shared object file: No such file or directory"
"libtree-sitter-javascript: cannot open shared object file: No such
file or directory" "libtree-sitter-javascript.so: cannot open shared
object file: No such file or directory")
After:
(treesit-load-language-error
not-found
("libtree-sitter-z.so" "libtree-sitter-z.dylib")
"No such file or directory")
* src/treesit.c (treesit_load_language): Add base_candidates, remove
error_list, report base_candidates rather than error_list.