From 063686433f9707c6011b2a23d3aa85c3956d3a62 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 26 Feb 2022 19:28:55 +0100 Subject: [PATCH] home: vim: document 'treesitter-textobjects' maps By using 'which-key'. --- .../plugin/mappings/tree-sitter-textobjects.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 home/vim/after/plugin/mappings/tree-sitter-textobjects.vim diff --git a/home/vim/after/plugin/mappings/tree-sitter-textobjects.vim b/home/vim/after/plugin/mappings/tree-sitter-textobjects.vim new file mode 100644 index 0000000..ac960bd --- /dev/null +++ b/home/vim/after/plugin/mappings/tree-sitter-textobjects.vim @@ -0,0 +1,17 @@ +lua << EOF +local wk = require("which-key") + +local keys = { + ["aa"] = "a parameter", + ["ia"] = "inner parameter", + ["ab"] = "a block", + ["ib"] = "inner block", + ["ac"] = "a class", + ["ic"] = "inner class", + ["af"] = "a function", + ["if"] = "inner function", + ["ak"] = "a comment", +} + +wk.register(keys, { mode = "o" }) +EOF