From 5339acacec0996968d64fdbaf9fe8187bfea1b47 Mon Sep 17 00:00:00 2001
From: Ben Puryear <54869170+Ben10164@users.noreply.github.com>
Date: Tue, 16 Jul 2024 09:34:51 -0700
Subject: [PATCH] feat(R): added new which-key group for new install feature
(#4078)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Description
A new feature was added to `r.nvim` that added a new key bind. This pr
adds that key bind (and group in case more are added) to the current
which-key config.
(I also removed a comment that I made previously for increasing the
width of the which-key window to fit the longer keybind descriptions,
something that eventually was taken out of the previous PR long ago)
## Related Issue(s)
None
## Screenshots
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
---
lua/lazyvim/plugins/extras/lang/r.lua | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lua/lazyvim/plugins/extras/lang/r.lua b/lua/lazyvim/plugins/extras/lang/r.lua
index 96e618b3..f2c46041 100644
--- a/lua/lazyvim/plugins/extras/lang/r.lua
+++ b/lua/lazyvim/plugins/extras/lang/r.lua
@@ -19,14 +19,15 @@ return {
vim.keymap.set("n", "", "RDSendLine", { buffer = true })
vim.keymap.set("v", "", "RSendSelection", { buffer = true })
- -- Increase the width of which-key to handle the longer r-nvim descriptions
local wk = require("which-key")
wk.add({
+ buffer = true,
{ "a", group = "all" },
{ "b", group = "between marks" },
{ "c", group = "chunks" },
{ "f", group = "functions" },
{ "g", group = "goto" },
+ { "i", group = "install" },
{ "k", group = "knit" },
{ "p", group = "paragraph" },
{ "q", group = "quarto" },