Skip to content

Commit

Permalink
feat!: v3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 12, 2024
1 parent ab6331f commit da258a8
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 28 deletions.
35 changes: 35 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 💥 What's New in 3.0?

Major update for [which-key.nvim](https://github.com/folke/which-key.nvim)! This release includes a complete rewrite and several new features.
**which-key** was my very first plugin, so it was time for a fresh start. 🎉

-**Full Rewrite**: Improved performance and functionality.
- 👀 **Visual & Operator Pending Mode Integration**: Now uses `ModeChanged`, eliminating the need for operator remappings.
- 🔧 **Simplified Mappings**: Removed obscure secret mappings.
- 🔒 **Safer Auto Triggers**: Auto triggers are now never created for single keys apart from `g` and `z`. All other letters are unsafe.
- ⏱️ **Delay**: Set delay independently of `timeoutlen`.
- 🛠️ **Layout**:
- Presets: `classic`, `modern`, and `helix`.
- Enable/disable which-key for specific modes.
- Configurable sorting with options like `local`, `order`, `group`, `alphanum`, `mod`, `lower`, `icase`, `desc`, and `manual`.
- Expand groups with fewer keymaps.
- Customizable string replacements for `key` and `desc`.
- 🎨 **Icon Support**:
- Auto-detect icons for keymaps using `lazy.nvim`.
- Custom icon rules and specifications for mapping levels.
- 🚫 **Never Get in the Way**: Avoids overlapping with the cursor.
- 🗂️ **New Mapping Spec**: New and better mappings spec, more in line with `vim.keymap.set` and how you define keymaps with [lazy.nvim](https://github.com/folke/lazy.nvim)
- 🐛 New Bugs: Lots of new and exciting bugs to discover! 🐞

## Screenshots

**Classic Mode**
![image](https://github.com/folke/which-key.nvim/assets/292349/14195bd3-1015-4c44-81c6-4ef8f2410c1b)

**Modern Mode**
![image](https://github.com/folke/which-key.nvim/assets/292349/842e9311-ded9-458a-bed4-2b12f075c85f)

**Helix Mode**
![image](https://github.com/folke/which-key.nvim/assets/292349/ca553e0c-e92d-4968-9dce-de91601c5c5c)

For detailed configuration and usage instructions, refer to the updated README.
48 changes: 20 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ in a popup as you type.
![image](https://github.com/user-attachments/assets/f8d71a75-312e-4a42-add8-d153493b2633)
![image](https://github.com/user-attachments/assets/e4400a1d-7e71-4439-b6ff-6cbc40647a6f)



## ✨ Features

- 🔍 **Key Binding Help**: show available keybindings in a popup as you type.
Expand Down Expand Up @@ -303,7 +301,6 @@ Shows a list of your buffer local and global marks when you hit \` or '

![image](https://github.com/user-attachments/assets/43fb0874-7f79-4521-aee9-03e2b0841758)


### Registers

Shows a list of your buffer local and global registers when you hit " in _NORMAL_ mode, or `<c-r>` in _INSERT_ mode.
Expand All @@ -316,36 +313,31 @@ When enabled, this plugin hooks into `z=` and replaces the full-screen spelling

![image](https://github.com/user-attachments/assets/102c7963-329a-40b9-b0a8-72c8656318b7)


## 🎨 Colors

The table below shows all the highlight groups defined for **WhichKey** with their default link.

<!-- colors:start -->

| Highlight Group | Default Group | Description |
| --- | --- | --- |
| **WhichKey** | ***Function*** | |
| **WhichKeyBorder** | ***FloatBorder*** | Border of the which-key window |
| **WhichKeyDesc** | ***Identifier*** | description |
| **WhichKeyFloat** | ***NormalFloat*** | Normal in th which-key window |
| **WhichKeyGroup** | ***Keyword*** | group name |
| **WhichKeyIcon** | ***@markup.link*** | icons |
| **WhichKeyIconAzure** | ***Function*** | |
| **WhichKeyIconBlue** | ***DiagnosticInfo*** | |
| **WhichKeyIconCyan** | ***DiagnosticHint*** | |
| **WhichKeyIconGreen** | ***DiagnosticOk*** | |
| **WhichKeyIconGrey** | ***Normal*** | |
| **WhichKeyIconOrange** | ***DiagnosticWarn*** | |
| **WhichKeyIconPurple** | ***Constant*** | |
| **WhichKeyIconRed** | ***DiagnosticError*** | |
| **WhichKeyIconYellow** | ***DiagnosticWarn*** | |
| **WhichKeySeparator** | ***Comment*** | the separator between the key and its description |
| **WhichKeyTitle** | ***FloatTitle*** | Title of the which-key window |
| **WhichKeyValue** | ***Comment*** | values by plugins (like marks, registers, etc) |
| Highlight Group | Default Group | Description |
| ---------------------- | --------------------- | ------------------------------------------------- |
| **WhichKey** | **_Function_** | |
| **WhichKeyBorder** | **_FloatBorder_** | Border of the which-key window |
| **WhichKeyDesc** | **_Identifier_** | description |
| **WhichKeyFloat** | **_NormalFloat_** | Normal in th which-key window |
| **WhichKeyGroup** | **_Keyword_** | group name |
| **WhichKeyIcon** | **_@markup.link_** | icons |
| **WhichKeyIconAzure** | **_Function_** | |
| **WhichKeyIconBlue** | **_DiagnosticInfo_** | |
| **WhichKeyIconCyan** | **_DiagnosticHint_** | |
| **WhichKeyIconGreen** | **_DiagnosticOk_** | |
| **WhichKeyIconGrey** | **_Normal_** | |
| **WhichKeyIconOrange** | **_DiagnosticWarn_** | |
| **WhichKeyIconPurple** | **_Constant_** | |
| **WhichKeyIconRed** | **_DiagnosticError_** | |
| **WhichKeyIconYellow** | **_DiagnosticWarn_** | |
| **WhichKeySeparator** | **_Comment_** | the separator between the key and its description |
| **WhichKeyTitle** | **_FloatTitle_** | Title of the which-key window |
| **WhichKeyValue** | **_Comment_** | values by plugins (like marks, registers, etc) |

<!-- colors:end -->

```
```

0 comments on commit da258a8

Please sign in to comment.