From 789bbded06990dbf4bcd830920aa3b44589b9516 Mon Sep 17 00:00:00 2001 From: Junha Park Date: Wed, 23 Apr 2025 02:05:51 +0800 Subject: [PATCH] Improve comment in `keymaps.lua` on how to add keymap in lazyvim style This is the file that users are directed to in `lua/config/keymaps.lua`. ``` -- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here ``` So it would be much better to explicitly guide them to use the which-key API. --- lua/lazyvim/config/keymaps.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index fbc7f5d1..167b9d74 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -2,6 +2,8 @@ -- DO NOT USE `LazyVim.safe_keymap_set` IN YOUR OWN CONFIG!! -- use `vim.keymap.set` instead +-- or use local `wk = require("which-key")` and `wk.add`, to utilise the popup from the which-key plugin. +-- for more information, go to https://github.com/folke/which-key.nvim local map = LazyVim.safe_keymap_set -- better up/down