cinnamon.nvim icon indicating copy to clipboard operation
cinnamon.nvim copied to clipboard

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

Open ZacharyRizer opened this issue 2 years ago • 3 comments

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 avatar Sep 19 '22 17:09 ZacharyRizer

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 avatar Dec 04 '22 17:12 declancm

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

simonmandlik avatar Jun 18 '24 17:06 simonmandlik

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

declancm avatar Jun 27 '24 20:06 declancm