home: vim: document 'tree-sitter' moves

This commit is contained in:
Bruno BELANYI 2022-02-26 19:45:19 +01:00
parent 8ad5327c89
commit 56554f1a7a

View file

@ -1,7 +1,18 @@
lua << EOF lua << EOF
local wk = require("which-key") local wk = require("which-key")
local keys = { local motions = {
["]m"] = "Next method start",
["]M"] = "Next method end",
["]]"] = "Next class start",
["]["] = "Next class end",
["[m"] = "Previous method start",
["[M"] = "Previous method end",
["[["] = "Previous class start",
["[]"] = "Previous class end",
}
local objects = {
["aa"] = "a parameter", ["aa"] = "a parameter",
["ia"] = "inner parameter", ["ia"] = "inner parameter",
["ab"] = "a block", ["ab"] = "a block",
@ -13,5 +24,6 @@ local keys = {
["ak"] = "a comment", ["ak"] = "a comment",
} }
wk.register(keys, { mode = "o" }) wk.register(motions, { mode = "n" })
wk.register(objects, { mode = "o" })
EOF EOF