aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Coudron <mcoudron@hotmail.com>2021-03-16 01:57:32 +0100
committerMatthieu Coudron <mcoudron@hotmail.com>2021-03-16 01:57:32 +0100
commit2b0c34053da15e40a4bf281d0b45b3b7a55b1a09 (patch)
tree490e5c436bf300e1e98550a4e231ac66e52c4d1a
parentb5401418768af496ef23b790f700a44b61ad784d (diff)
downloadrneovim-2b0c34053da15e40a4bf281d0b45b3b7a55b1a09.tar.gz
rneovim-2b0c34053da15e40a4bf281d0b45b3b7a55b1a09.tar.bz2
rneovim-2b0c34053da15e40a4bf281d0b45b3b7a55b1a09.zip
chore(ts): show grammar that triggers the error
to help debugging
-rw-r--r--src/nvim/lua/treesitter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c
index a640b97d3b..33974c71cb 100644
--- a/src/nvim/lua/treesitter.c
+++ b/src/nvim/lua/treesitter.c
@@ -171,7 +171,7 @@ int tslua_add_language(lua_State *L)
TSLanguage *lang = lang_parser();
if (lang == NULL) {
- return luaL_error(L, "Failed to load parser: internal error");
+ return luaL_error(L, "Failed to load parser %s: internal error", path);
}
uint32_t lang_version = ts_language_version(lang);
@@ -179,7 +179,8 @@ int tslua_add_language(lua_State *L)
|| lang_version > TREE_SITTER_LANGUAGE_VERSION) {
return luaL_error(
L,
- "ABI version mismatch : supported between %d and %d, found %d",
+ "ABI version mismatch for %s: supported between %d and %d, found %d",
+ path,
TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION,
TREE_SITTER_LANGUAGE_VERSION, lang_version);
}