aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/treesitter.c
diff options
context:
space:
mode:
authorMatthieu Coudron <teto@users.noreply.github.com>2023-01-22 16:51:17 +0100
committerGitHub <noreply@github.com>2023-01-22 16:51:17 +0100
commit151b9fc52e3cd69b386eb2dc4e5a0d179667190b (patch)
tree662caf8389fcc32ec9a074dc60affdfa8248d505 /src/nvim/lua/treesitter.c
parent80bede1dfc6c2fcd5ec013045585802bb18d9fc9 (diff)
downloadrneovim-151b9fc52e3cd69b386eb2dc4e5a0d179667190b.tar.gz
rneovim-151b9fc52e3cd69b386eb2dc4e5a0d179667190b.tar.bz2
rneovim-151b9fc52e3cd69b386eb2dc4e5a0d179667190b.zip
feat(treesitter): show filetype associated with parser (#17633)
to ease debug. At one point I had an empty filetype and the current message was not helpful enough
Diffstat (limited to 'src/nvim/lua/treesitter.c')
-rw-r--r--src/nvim/lua/treesitter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c
index fecf746036..56f4daed1a 100644
--- a/src/nvim/lua/treesitter.c
+++ b/src/nvim/lua/treesitter.c
@@ -182,8 +182,8 @@ int tslua_add_language(lua_State *L)
uv_lib_t lib;
if (uv_dlopen(path, &lib)) {
- snprintf(IObuff, IOSIZE, "Failed to load parser: uv_dlopen: %s",
- uv_dlerror(&lib));
+ snprintf(IObuff, IOSIZE, "Failed to load parser for language '%s': uv_dlopen: %s",
+ lang_name, uv_dlerror(&lib));
uv_dlclose(&lib);
lua_pushstring(L, IObuff);
return lua_error(L);