mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-02-28 19:50:38 +00:00
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 `<leader>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 `<leader>m` key combination in normal mode.
This commit is contained in:
11
lua/absolute/after/treesj.lua
Normal file
11
lua/absolute/after/treesj.lua
Normal file
@@ -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", "<leader>m", "<cmd>TSJToggle<CR>", opts)
|
||||||
Reference in New Issue
Block a user