Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Nov 21, 2023
1 parent d1fad84 commit 9501fe5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
2 changes: 0 additions & 2 deletions src/conf/plugins/treesitter/nvim-treesitter-textobject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ function generateActions() {
"@parameter.inner"
);
},
keys: ",",
})
.addOpts({
id: "treesitter-textobjects.swap-next",
Expand All @@ -85,7 +84,6 @@ function generateActions() {
"@parameter.inner"
);
},
keys: ".",
})
.build();
}
Expand Down
41 changes: 20 additions & 21 deletions src/conf/plugins/treesitter/treesj.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { RightClickIndexes } from "@conf/base";
import { Plugin, PluginOpts } from "@core/model";
import {
ActionGroupBuilder,
Plugin,
PluginOpts,
andActions,
} from "@core/model";

const spec: PluginOpts = {
shortUrl: "Wansmer/treesj",
Expand All @@ -13,25 +18,19 @@ const spec: PluginOpts = {
},
config: true,
},
allowInVscode: true,
extends: {
commands: [
{
name: "Toggle Split/Join",
enabled: (buffer) => {
return buffer.tsHighlighter.length > 0;
},
callback: () => {
vim.api.nvim_command("TSJToggle");
},
rightClick: {
title: "Split/Join",
keys: ["t"],
index: RightClickIndexes.treesj,
},
},
],
},
allowInVscode: true,
};

export const plugin = new Plugin(spec);
function generateActions() {
return ActionGroupBuilder.start()
.category("Treesj")
.from("treesj")
.addOpts({
id: "treesj.toggle",
title: "Toggle Split/Join",
callback: "TSJToggle",
})
.build();
}

export const plugin = new Plugin(andActions(spec, generateActions));

0 comments on commit 9501fe5

Please sign in to comment.