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

Relative line jumps and integrating with a modified movement plugin like Leap. #15

Open
ZacharyRizer opened this issue Sep 19, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@ZacharyRizer
Copy link

ZacharyRizer commented Sep 19, 2022

So I know cinnamon scrolls with [count]G, but is it possible to have it scroll with relative line jumps as well, i.e. [count]j or [count]k?

I was also curious if it is possible to integrate cinnamon with a plugin like Leap (https://github.com/ggandor/leap.nvim)

Leap is always activated (like Sneak) with 's', 'S', 'gs', and 'gS'. And then you can hop around the page. Is there a way to integrate a plugin like this to have smooth scrolling from cinnamon?

Thanks.

@ZacharyRizer ZacharyRizer changed the title Integrating with a modified movement plugin like Leap. Relative line jumps and integrating with a modified movement plugin like Leap. Sep 19, 2022
@declancm
Copy link
Owner

declancm commented Dec 4, 2022

Hi! Sorry I didn't get to this earlier, I've been busy with a new job. If you enable the extended keymaps in the plugin config you can have smooth scrolling with [count]j and [count]k :). I'll definitely look into integrating with a plugin like sneak!

@declancm declancm added the enhancement New feature or request label Mar 21, 2024
@simonmandlik
Copy link

Also, integration with https://github.com/folke/flash.nvim would be amazing!

@declancm
Copy link
Owner

declancm commented Jun 27, 2024

Integration with flash.nvim is now possible with a config like this:

local cinnamon = require('cinnamon')
local flash = require('flash')
local jump = require('flash.jump')

cinnamon.setup()

flash.setup({
  action = function(match, state)
    cinnamon.scroll(function()
      jump.jump(match, state)
      jump.on_jump(state)
    end)
  end,
})

I might be able to make this a builtin feature enabled with a config option but for now I'll add snippets like this to the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants