From 4972a74da7c2abbe2f43680b8efbbc0d4857d239 Mon Sep 17 00:00:00 2001 From: pseudometa <73286100+chrisgrieser@users.noreply.github.com> Date: Sat, 7 Oct 2023 12:02:52 +0200 Subject: [PATCH] docs: add lazy-loading example for `lazy.nvim` (#30) --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a75607a..921567f 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,17 @@ If you prefer to use this plugin only for subword motion, you can disable this f use { "chrisgrieser/nvim-spider" } -- lazy.nvim -{ "chrisgrieser/nvim-spider", lazy = true }, +{ + "chrisgrieser/nvim-spider", + -- example for lazy-loading and keymap + keys = { + { + "e", + function() require("spider").motion("e") end, + mode = { "n", "o", "x" }, + }, + }, +}, ``` No keybindings are created by default. Below are the mappings to replace the default `w`, `e`, and `b` motions with this plugin's version of them.