From d7ca1f2cc272cc7717d32b9f0c74ae69a9bcfb1a Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Wed, 18 Sep 2024 19:16:16 -0700 Subject: [PATCH] treesj being cool and awesome --- lua/plugins/treesj.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/treesj.lua b/lua/plugins/treesj.lua index c5bb419..aa696eb 100644 --- a/lua/plugins/treesj.lua +++ b/lua/plugins/treesj.lua @@ -8,6 +8,13 @@ return { { "ts", "TSJSplit", desc = "Treesitter Split" }, }, config = function() - require("treesj").setup({ use_default_keymaps = false }) + require("treesj").setup({ + use_default_keymaps = false, + on_error = function(err_text, level) + if not err_text:find("splitted") then + vim.cmd.join() + end + end, + }) end, }