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

Not picking up j/k repeating when using NvChad distro #31

Closed
nooproblem opened this issue Aug 20, 2023 · 4 comments
Closed

Not picking up j/k repeating when using NvChad distro #31

nooproblem opened this issue Aug 20, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@nooproblem
Copy link

nooproblem commented Aug 20, 2023

Firstly, thanks for making this amazing plugin! I am using the NvChad distro, and I have installed hardtime.nvim using Lazy and set lazy = false so the plugin is enabled on startup. I have run into a odd situation where it hardtime.nvim does not pick up j/k repeating. I can fix this issue by running ":Hardtime toggle" twice (or ":Hardtime disable" and then ":Hardtime enable") in order to switch hardtime.nvim off/on. Any thoughts on why this might occurring would be appreciated!

@m4xshen
Copy link
Owner

m4xshen commented Aug 20, 2023

Does hardtime.nvim not pick up only j/k repeating? How about other keys?

@m4xshen m4xshen added the bug Something isn't working label Aug 20, 2023
@nosduco
Copy link

nosduco commented Aug 20, 2023

Also running NvChad and am having this issue. I am wondering if it is due to NvChad's j/k mapping https://github.com/NvChad/NvChad/blob/v2.0/lua/core/mappings.lua#L40

@m4xshen
Copy link
Owner

m4xshen commented Aug 21, 2023

Please delete the NvChad's j/k mapping and move them into keys setting of hardtime.nvim. This should make sure the keymap is loaded before the pluglin.

{
    "m4xshen/hardtime.nvim",
    dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
    lazy = false,
    keys = {
      { "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"' },
      { "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"' }
    },
    opts = {}
}

@nooproblem nooproblem changed the title JK j/k not repeating when using NvChad distro Aug 21, 2023
@nooproblem
Copy link
Author

Thank you!

@m4xshen m4xshen pinned this issue Aug 21, 2023
@nooproblem nooproblem changed the title j/k not repeating when using NvChad distro Not picking up j/k repeating when using NvChad distro Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants