mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
## For people who want to use it NOW!
Use `init` to hack the latest version before this PR merge.
```lua
{
"folke/snacks.nvim",
init = function()
local sources = require("snacks.picker.config.sources")
sources.grep.toggles = {
regex = { value = true },
}
sources.grep.win = {
input = {
keys = {
["<a-r>"] = { "toggle_regex", mode = { "n", "i" }, desc = "Toggle Regex" },
},
},
}
end,
},
```
## Description
This PR adds a new keymap `<a-r>` for toggling the regex in grep picker.
It allows user to get faster when searching some special strings like
`$props()`, or just put a part of line `test to jump faster.
## Related Issue(s)
<!--
If this PR fixes any issues, please link to the issue here.
- Fixes #<issue_number>
-->
## Screenshots
https://github.com/user-attachments/assets/2442b21c-898f-4682-a966-5a82abdd23e8
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
|
||
|---|---|---|
| .. | ||
| snacks | ||
| trouble/sources | ||