-
Notifications
You must be signed in to change notification settings - Fork 7
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
Store maps in a table, and add description support #17
Conversation
Hey Corey. Thanks for the PR. I will start to review it once 1.1 is done - I am working on that right now. |
3f98fad
to
1e33d1a
Compare
EDIT: this can be seen in my |
85f2ac6
to
013d45c
Compare
I rebased my code off of (and changed the merge target to) |
@Corey-Keller I created a branch for 1.2 - lets rebase and PR targeting that branch for this feature. I will try to find some time this week to put some thought and feedback into it :-) |
@LionC have you had a chance to look at/think about this yet? Not rushing/pushing you or anything (life always comes first), just wondering, in case it slipped your mind. |
Looking at it now ;-) |
So I looked at it and played around with it a bit. I took the liberty to modify the branch - I hope that is fine, as you marked it to be editable for maintainers. Points behind the way I implemented it:
|
@LionC I'm getting errors like:
Line 205 of |
@LionC I don't know about the 'name' cascading, since it's really just a descriptor for an individual mapping. I would however suggest cascading labels (like the "category" setting in nvim-mapper, but allowing for multiple, so that a mapping for some LSP functionality that takes a motion (like I agree on not being sure about the API. You mention not being sure about using the 3rd anonymous argument, but I was just going along with the other 2 (which were also anonymous). The current method of 2 anonymous arguments, and 1 named seems really weird. Might be a good idea to make them all named explicitly. |
The reason for the two anonymous arguments is that they are eht eonly required ones - the most minimal mapping is { 'S', 's<CR><Esc>' } with no named optional fields. As |
I will take a look - but I thought I fixed that (had a version with that problem in between). |
Fixed - never code when tired ;-) |
If you cannot find any bugs with this, I would be fine to merge it into |
Works for me. Although I'd personally argue that f320a93 is a non-positive change (I wanted to say |
I have no strong feelings about that - name makes clear that it is a short-ish string and both nam and description work for me, as they both are some human readable string trying to describe something shortly. Tbh, the main point is that |
That's true. If users are going to have to include it in each mapping, then shorter is definitely better. |
This adds a global table
NestMapsTable
that holds all nest mappings (providing a base that future integrations can build off of), and adds very minimal support for descriptions (they can be added as a 3rd field and it won't cause an error, but no code makes actual use of it yet).It's a decent first step to closing #4 I think.