diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-06-30 00:02:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-30 00:02:46 +0200 |
commit | 1920ba4b5597a872973de0a5d558cbbf23063fb6 (patch) | |
tree | d3c2cda699808a08493c6ce7883533b5186de46d /src/nvim/lua/executor.c | |
parent | fd545d46fa9d9472159485ebc03e1f39417ee9c0 (diff) | |
parent | 69816f5e134f0e965352367b5928835794da1698 (diff) | |
download | rneovim-1920ba4b5597a872973de0a5d558cbbf23063fb6.tar.gz rneovim-1920ba4b5597a872973de0a5d558cbbf23063fb6.tar.bz2 rneovim-1920ba4b5597a872973de0a5d558cbbf23063fb6.zip |
Merge pull request #12491 from vigoux/treesitter-set-ranges
[RDY] Treesitter set ranges
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r-- | src/nvim/lua/executor.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index 327ed6d6b7..4b47b34d8a 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -1128,21 +1128,11 @@ void ex_luafile(exarg_T *const eap) } } -static int create_tslua_parser(lua_State *L) -{ - if (lua_gettop(L) < 1 || !lua_isstring(L, 1)) { - return luaL_error(L, "string expected"); - } - - const char *lang_name = lua_tostring(L, 1); - return tslua_push_parser(L, lang_name); -} - static void nlua_add_treesitter(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL { tslua_init(lstate); - lua_pushcfunction(lstate, create_tslua_parser); + lua_pushcfunction(lstate, tslua_push_parser); lua_setfield(lstate, -2, "_create_ts_parser"); lua_pushcfunction(lstate, tslua_add_language); |