Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(motion): add move plugin flash nvim #340

Merged
merged 1 commit into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lua/astrocommunity/motion/flash-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# flash.nvim

`flash.nvim` lets you navigate your code with search labels, enhanced character motions, and Treesitter integration.

**Repository:** <https://github.com/folke/flash.nvim>

## ✨ Features

- 🔍 **Search Integration**: integrate **flash.nvim** with your regular
search using `/` or `?`. Labels appear next to the matches,
allowing you to quickly jump to any location. Labels are
guaranteed not to exist as a continuation of the search pattern.
- ⌨️ **type as many characters as you want** before using a jump label.
- ⚡ **Enhanced `f`, `t`, `F`, `T` motions**
- 🌳 **Treesitter Integration**: all parents of the Treesitter node
under your cursor are highlighted with a label for quick selection
of a specific Treesitter node.
- 🎯 **Jump Mode**: a standalone jumping mode similar to search
- 🔎 **Search Modes**: `exact`, `search` (regex), and `fuzzy` search modes
- 🪟 **Multi Window** jumping
- 🌐 **Remote Actions**: perform motions in remote locations
- ⚫ **dot-repeatable** jumps
- 📡 **highly extensible**: check the [examples](https://github.com/folke/flash.nvim#-examples)
32 changes: 32 additions & 0 deletions lua/astrocommunity/motion/flash-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
vscode = true,
opts = {},
keys = {
{
"s",
mode = { "n", "x", "o" },
function() require("flash").jump() end,
desc = "Flash",
},
{
"S",
mode = { "n", "o", "x" },
function() require("flash").treesitter() end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function() require("flash").remote() end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function() require("flash").treesitter_search() end,
desc = "Treesitter Search",
},
},
}