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

Add gitsigns essential keymaps

Open dam9000 opened this issue 1 year ago • 3 comments

An alternative attempt at including only the essential keymaps compared to the full list in: https://github.com/nvim-lua/kickstart.nvim/pull/740 Changes compared to the full list:

  • reduced the list of keymaps as suggested by @lewis6991 (the author of gitsigns): https://github.com/nvim-lua/kickstart.nvim/pull/740#pullrequestreview-1948295290
  • simplified navigation keymap code - verified that it works also in diff mode, the only difference is a slight change in behaviour as gitsigns navigation does wrap-around while original diff mode does not. Also confirmed with @lewis6991 that it should work.
  • Added a note pointing to gitsigns README for the full list of keymaps

Compared to the original PR this one has about half the lines of code, hopefully this will make it more likely to be included.

dam9000 avatar Mar 20 '24 10:03 dam9000

LGTM but I'll defer to @tjdevries as I haven't had a problem with this stuff from jump, but can appreciate the desire to keep things small and understandable.

feoh avatar Mar 20 '24 18:03 feoh

Hi!

Just wanted to mention what I did and ask if this might be a good option for you:

https://github.com/feoh/kickstart.nvim/commit/52722b7524b152fb77772ad968a54fc56a51ff50

If I install gitsigns like a regular old plugin, I get it in all its full fat goodness. Keymaps, configs. The whole enchilada.

Why not just do that? What am I missing? That way @tjdevries can get his super minimal starting point for new folks, and we can enjoy our luxurious git manipulating goodness in our forks? :)

Sorry if I'm missing something obvious, and in NO way do I mean to cut down the value of all your amazing contributions and work on this project.

You really have been an outstanding contributor, and I for one sincerely appreciate it!

Should you ever come to Boston, MA, USA. Please do look me up! I'd love to buy you a beverage or dinner or whatever :)

feoh avatar Mar 21 '24 01:03 feoh

@feoh your suggestion works. But I think it's not clean that a plugin has the spec split into two files. Please open a PR with your solution so there are more options for TJ to pick from. It's not a question what works for me, I have the full enchilada no worries, the question is what is the best for the average or new Neovim user. I think a new Neovim user isn't necessarily a fresh developer, he can be an experienced developer looking for a new editor. A perfect example: DHH moving to Neovim: https://twitter.com/dhh/status/1764340531877105824

Anyway let's wait for @tjdevries feedback and we'll see.

And thanks for the kind words, I have no travel plans to US at the moment, but I'll keep it in mind :)

dam9000 avatar Mar 21 '24 08:03 dam9000

Just coming back to this in my usual PR check:

I don't know that generating a PR of my change is appropriate because my change has the gitsigns plugin installed in lua/custom/plugins which I think we'd prefer to reserve for end users to fill themselves :)

feoh avatar Apr 03 '24 20:04 feoh

Gitsigns has just updated and next_hunk() and prev_hunk() has been deprecated. This is the commit with the new suggested way to do keymaps: https://github.com/lewis6991/gitsigns.nvim/commit/59bdc1851c7aba8a86ded87fe075ef6de499045c

SebasF1349 avatar Apr 06 '24 00:04 SebasF1349

Closed in favor of #858. Thanks for the hard work on this!

feoh avatar Apr 18 '24 01:04 feoh