Giter VIP home page Giter VIP logo

cinnamon.nvim's People

Contributors

declancm avatar lvim-tech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cinnamon.nvim's Issues

[Feature request] Smooth scrolling through folds

First of all, thank you for a very cool plugin! I tried other similar plugins, but none of them can map j and k effectively, which I use a lot (I map J = 10j and K = 10k for vertical movement instead of <C-d and <C-u).

So far, so good. Just one thing I feel a bit "missing" is the ability to scroll through folds (and still smooth!). Currently, it feels slow and sticky when going through folds. I would really appreciate it if this issue could be solved.

Thanks again, and have a good day ๐Ÿ˜„

Feature request: add 'keepjumps' argument to Scroll function

I don't want my jump list to collect all the 'n' motions, so this is what i had in Vim:
nnoremap n :execute "keepjumps norm! " . v:count1 . "nzz"
nnoremap N :execute "keepjumps norm! " . v:count1 . "Nzz"

Would be nice to control which motions in this plugin are or are not passed to the jumplist.

[Feature request] Total delay for the whole animation

Hey! I've been playing around with the plugin and it feels really nice and snappy, thanks!

One problem I have is that if the scrolling happens over a large number of lines, then the animation can take quite a while to finish. For example, with a default_delay of 3ms, it looks fine when scrolling with <C-d> or similar, but using gg or other methods to go 100 lines downwards takes quite a while. 0.5ms or 1ms feels like a better number for such cases.

But it's not really possible to configure "if scrolling is over 20 lines, use 3ms, if over 90, use 0.5ms, etc.".

I'm thinking that a solution might be to have a "total delay" so that I could say that the total scrolling time should be 60ms and then the plugin would calculate the per-line delay automatically. Also, it could even skip scrolling every other line in some extreme cases (although I'm not sure how smooth that would look like ๐Ÿ˜„). With such a solution, we might be able to set the scroll_limit to a very high number and still have snappy scrolling (or even not have a limit at all).

What do you think of such an idea?

Holding down a movement key with scrolling crashes neovim

it seems to happen with any call to Scroll(). I would visit a long file and hold down the key (ctrl d/u) in my case. Sometimes I would reach the end of the file, but I could get it crashing every time.

below are my plugin setup options using lazy.nvim:

{
'declancm/cinnamon.nvim',
opts = {
default_delay = 1,
extra_keymaps = true,
},
},

Cinnamon not scrolling in certain cases

Hi. I have encountered a weird issue where cinnamon will not scroll if I am on the top 2 lines and the bottom 2 lines.

If I go to the topmost line on my screen and try <Page-up> it would instead just send my cursor to the 2nd line and not scroll.

Is this intended? Or am I doing something wrong?

My setup is

require("cinnamon").setup({
  extra_keymaps = true,
  default_delay = 15,

  scroll_limit = 150
})

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

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.

vertical split couse slow down of cinnamon

When I have only one window open moves smooth and is responsive, but once I open a window splitted vertically the cursor slow down a lot.
This is my configuration:

require("cinnamon").setup({
	-- KEYMAPS:
	default_keymaps = true, -- Create default keymaps.
	extra_keymaps = true, -- Create extra keymaps.
	extended_keymaps = true, -- Create extended keymaps.
	override_keymaps = false, -- The plugin keymaps will override any existing keymaps.

	-- OPTIONS:
	always_scroll = true, -- Scroll the cursor even when the window hasn't scrolled.
	centered = false, -- Keep cursor centered in window when using window scrolling.
	default_delay = 10, -- The default delay (in ms) between each line when scrolling.
	hide_cursor = false, -- Hide the cursor while scrolling. Requires enabling termguicolors!
	horizontal_scroll = true, -- Enable smooth horizontal scrolling when view shifts left or right.
	max_length = 200, -- Maximum length (in ms) of a command. The line delay will be
	-- re-calculated. Setting to -1 will disable this option.
	scroll_limit = 100, -- Max number of lines moved before scrolling is skipped. Setting
	-- to -1 will disable this option.
})

This bug occurs with any types of buffer, even empty ones.

[Feature request] hide cursor on scroll

Nice plugin ๐Ÿ‘

It would be perfect if you could add the functionality for the cursor to hide when scrolling. This would make the scrolling experience more enjoyable.

dont use `/plugin` for setup function

calling the setup function in /plugin seems not really useful to me.
Users should call the setup function.

Normally this wouldn't be a big deal but in this case it creates keymaps before I call the setup function where I disable default keymaps.

statusline/lualine flashes with cmdheight=0

Thanks for the awesome plugin! One small issue, I use cmdheight=0 and when pressing C-d/u, statusline and lualine flashes which is impossible to not see. Hoping there's a solution, thanks.

Show number of results

First of all this plugin is amazing really love this. Now the problem is that I would like the plugin when scrolling with n, N in the search results to print the number of results and what number of results I am in, for example 17/36

`gg` & `G` is not using default_delay

I found this in init.lua

utils.create_keymap({ 'n', 'x' }, 'gg', "<Cmd>lua Scroll('gg', 0, 0, 5)<CR>")
utils.create_keymap({ 'n', 'x' }, 'G', "<Cmd>lua Scroll('G', 0, 1, 5)<CR>")

Is it possible for gg and G to use default delay like others?

Handle count before commands

Hello,

Thanks for this great plugin !

Sill, how can we use a count before a command ? (ex: 42G goes right at the bottom even if there are more than 42 lines, where G is mapped this way: keymap('n', 'G', "<Cmd>lua Cinnamon.Scroll('G', 0, 0, 3)<CR>", opts))

Regards.

Feature request: stop in middle of animation scrolling

For example, the file is very long, and with this plugin enabled, press 'G' will trigger animated scrolling and bring view to the bottom, which is very nice.

I wonder if it would stop the scrolling once I press a key like <ESC>, so i can stop at somewhere, so I don't have to keep pressing <C-d> or 'j' to scroll to a place.

[Docs] Add example

Please add an example in the readme so people can see how it looks after installint and configure this plugin

[Feature request] Support mouse scrolling

Hi,

So I want to preface this by saying that I realise that I can remap the mouse scroll wheel commands, and I've been doing that for years with various smooth scroll plugins.

So why does this need a different solution?

  1. <c-u> and <c-d> are too aggressive for a touch bad where depending on how much force you use you could end up scrolling a huge amount which was unintended.
  2. <c-e> and <c-y> are too small and adding a count helps slightly, but currently in this plugins once you hit the top or bottom plus/minus the scroll off the cursor line begins to jitter wildly.
  3. Maybe you could take advantage of the new mousescroll option and use that to control how much scrolling happens?

There might be other ways to handle this, but I wonder if a dedicated command might not give a better result. One that can be sufficiently granular for mouse scrolling? Perhaps not, I have never properly looked into this sort of thing so no idea what's possible.

Horizontal scrolling

Good day to you!

is it possible to do window horizontal scrolling?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.