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(flash.nvim): promote 'flash' and 'hop' to builtin plugins #712

Merged
merged 2 commits into from
Feb 21, 2025
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
9 changes: 9 additions & 0 deletions docs/user_guide/editing_enhancements.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@

?> Edit the plugin settings in [lua/configs/kdheepak/lazygit-nvim](https://github.com/linrongbin16/lin.nvim/tree/main/lua/configs/kdheepak/lazygit-nvim), [lua/configs/airblade/vim-gitgutter](https://github.com/linrongbin16/lin.nvim/tree/main/lua/configs/airblade/vim-gitgutter), [lua/configs/linrongbin16/gitlinker-nvim](https://github.com/linrongbin16/lin.nvim/tree/main/lua/configs/linrongbin16/gitlinker-nvim) and [lua/configs/f-person/git-blame-nvim](https://github.com/linrongbin16/lin.nvim/tree/main/lua/configs/f-person/git-blame-nvim) directory.

## Cursor Motion

?> Supported by [flash.nvim](https://github.com/folke/flash.nvim) and [hop.nvim](https://github.com/smoka7/hop.nvim).

- `<Leader>j` 🄽 🅇 - Jump forward(👇) lines.
- `<Leader>k` 🄽 🅇 - Jump backward(👆) lines.
- `s` 🄽 🅇 - Jump to specific chars.
- `f`/`F`/`t`/`T` 🄽 🅇 - Improved forward(👉)/backward(👈) motion, with `;` repeat supported.

## Comments

?> Supported by [Comment.nvim](https://github.com/numToStr/Comment.nvim).
Expand Down
24 changes: 0 additions & 24 deletions lua/configs/smoka7/hop-nvim/keys.lua
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
local set_lazy_key = require("builtin.utils.keymap").set_lazy_key

local M = {
set_lazy_key(
{ "n", "x" },
"<leader>f",
"<cmd>HopChar1AC<cr>",
{ desc = "Jump forward by {char}" }
),
set_lazy_key(
{ "n", "x" },
"<leader>F",
"<cmd>HopChar1BC<cr>",
{ desc = "Jump backward by {char}" }
),
set_lazy_key(
{ "n", "x" },
"<leader>s",
"<cmd>HopChar2AC<cr>",
{ desc = "Jump forward by {char}{char}" }
),
set_lazy_key(
{ "n", "x" },
"<leader>S",
"<cmd>HopChar2BC<cr>",
{ desc = "Jump backward by {char}{char}" }
),
set_lazy_key({ "n", "x" }, "<leader>j", "<cmd>HopLineAC<cr>", { desc = "Jump to below lines" }),
set_lazy_key({ "n", "x" }, "<leader>k", "<cmd>HopLineBC<cr>", { desc = "Jump to above lines" }),
}
Expand Down
14 changes: 14 additions & 0 deletions lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,20 @@ local M = {

-- ---- ENHANCEMENT ----

-- Cursor motion
{
"smoka7/hop.nvim",
event = { VeryLazy, BufReadPre, BufNewFile },
version = "*",
config = lua_config("smoka7/hop.nvim"),
keys = lua_keys("smoka7/hop.nvim"),
},
{
"folke/flash.nvim",
event = { VeryLazy, BufReadPre, BufNewFile },
config = lua_config("folke/flash.nvim"),
keys = lua_keys("folke/flash.nvim"),
},
-- Comment
{
"numToStr/Comment.nvim",
Expand Down
14 changes: 0 additions & 14 deletions lua/plugins/users_sample.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@
-- config = lua_config("gbprod/yanky.nvim"),
-- keys = lua_keys("gbprod/yanky.nvim"),
-- },
-- -- Cursor motion
-- {
-- "smoka7/hop.nvim",
-- event = { VeryLazy, BufReadPre, BufNewFile },
-- version = "*",
-- config = lua_config("smoka7/hop.nvim"),
-- keys = lua_keys("smoka7/hop.nvim"),
-- },
-- {
-- "folke/flash.nvim",
-- event = { VeryLazy, BufReadPre, BufNewFile },
-- config = lua_config("folke/flash.nvim"),
-- keys = lua_keys("folke/flash.nvim"),
-- },
-- -- Oil file manager
-- {
-- "stevearc/oil.nvim",
Expand Down
Loading