From 74b076e030ef48f54e4c68dcbaefac532c3c8f0f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 23 Dec 2022 19:03:30 +0100 Subject: [PATCH] docs: added after/wants to migration guide and added an example that sets a key mode --- README.md | 5 ++++- TODO.md | 4 ++-- lua/lazy/example.lua | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 861c496..e2328c1 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,8 @@ return { { "monaqa/dial.nvim", -- lazy-load on keys - keys = { "", "" }, + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, }, -- local plugins need to be explicitly configured with dir @@ -582,6 +583,8 @@ For a real-life example, you can check my personal dots: - `lock` ➡️ `pin` - `disable=true` ➡️ `enabled = false` - `tag='*'` ➡️ `version="*"` +- `after` ℹ️ **_not needed_** for most use-cases. Use `dependencies` otherwise. +- `wants` ℹ️ **_not needed_** for most use-cases. Use `dependencies` otherwise. - `module` is auto-loaded. No need to specify - `keys` spec is [different](#%EF%B8%8F-lazy-key-mappings) diff --git a/TODO.md b/TODO.md index 9b51293..dc33bc0 100644 --- a/TODO.md +++ b/TODO.md @@ -63,5 +63,5 @@ - [x] Most emojis in "Configuration" aren't shown for me. - [x] add section on how to uninstall - [x] add `:Packadd` command or something similar -- [ ] headless install -- [ ] better keys handling +- [x] headless install +- [x] better keys handling diff --git a/lua/lazy/example.lua b/lua/lazy/example.lua index 0a9518a..870ad02 100644 --- a/lua/lazy/example.lua +++ b/lua/lazy/example.lua @@ -69,7 +69,8 @@ return { { "monaqa/dial.nvim", -- lazy-load on keys - keys = { "", "" }, + -- mode is `n` by default. For more advanced options, check the section on key mappings + keys = { "", { "", mode = "n" } }, }, -- local plugins need to be explicitly configured with dir