From 4f0f762caaf2f4cb4aa06a460c22ceb4a837397d Mon Sep 17 00:00:00 2001 From: David Ibia Date: Sun, 14 Jan 2024 04:01:44 +0100 Subject: [PATCH] feat(treesj.lua): add treesj.lua file to enable toggling of Treesitter Join functionality The treesj.lua file is added to the project to enable the toggling of Treesitter Join functionality. The `tsj.setup` function is called to configure the plugin with the option `use_default_keymaps` set to `false`. This ensures that the default keymaps provided by the plugin are not used. A keymap is set using `vim.keymap.set` to bind the `m` key combination in normal mode to the command `TSJToggle`. The `opts.desc` option is set to provide a description for the keymap. This change allows users to toggle the Treesitter Join functionality using the `m` key combination in normal mode. --- lua/absolute/after/treesj.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lua/absolute/after/treesj.lua diff --git a/lua/absolute/after/treesj.lua b/lua/absolute/after/treesj.lua new file mode 100644 index 0000000..75e68f6 --- /dev/null +++ b/lua/absolute/after/treesj.lua @@ -0,0 +1,11 @@ +local tsj = require("treesj") + +tsj.setup({ + use_default_keymaps = false, +}) + +local opts = {} + +opts.desc = "Toggle Treesitter Join" + +vim.keymap.set("n", "m", "TSJToggle", opts)