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

Error message on space #10

Closed
SevereOverfl0w opened this issue Apr 19, 2016 · 4 comments
Closed

Error message on space #10

SevereOverfl0w opened this issue Apr 19, 2016 · 4 comments

Comments

@SevereOverfl0w
Copy link

Another one of these, this one doesn't stop the menu from showing, but does really slow me down:

I think it doesn't very robustly handle conflicting entries of varying kinds. It's probably worth trying to detect errors like these at various points, and better explain the issue so it can be handled/corrected.

Error detected while processing function leaderGuide#start_by_prefix[9]..<SNR>28_start_parser[22]..<SNR>28_add_map_to_dict:                            
line    7:                                                                                                                                             
E730: using List as a String                                                                                                                           
line    8:                                                                                                                                             
E730: using List as a String                                                                                                                           
Error detected while processing function leaderGuide#start_by_prefix[9]..<SNR>28_start_parser[22]..<SNR>28_add_map_to_dict[12]..<SNR>28_add_map_to_dict
:                                                                                                                                                      
line    2:                                                                                                                                             
E715: Dictionary required                                                                                                                              
Error detected while processing function leaderGuide#start_by_prefix[9]..<SNR>28_start_parser[22]..<SNR>28_add_map_to_dict:                            
line    7:                                                                                                                                             
E730: using List as a String                                                                                                                           
line    8:                                                                                                                                             
E730: using List as a String                                                                                                                           
Error detected while processing function leaderGuide#start_by_prefix[9]..<SNR>28_start_parser[22]..<SNR>28_add_map_to_dict[12]..<SNR>28_add_map_to_dict
:                                                                                                                                                      
line    2:                                                                                                                                             
E715: Dictionary required                                                                                                                              
No mapping found
@SevereOverfl0w
Copy link
Author

This was caused by a problem with menu and a mapping.

I had a mapping to <leader>f for something, and also a mapping to <leader>fve, I added a file grouping g:lmap.f = {'name': 'File Menu'} which leader-guide was turning into [fm]. Quite a weird issue. Not sure if we're handling it in the best way.

@hecal3
Copy link
Owner

hecal3 commented Apr 20, 2016

I believe there are two separate, if somewhat related issues here. Both caused by conflicts between native vim mappings and configuration dictionaries.

First the error messages.
Mapping conflicts should not lead to any issues in add_map_to_dict().
I was able to reproduce the error messages. If I'm not mistaken those errors have introduced as a side effect of 30fd882. Will look into that.

The second point, the [fm] mapping is undoubtedly caused by mapping conflicts, but the way forward is less clear. What you are seeing is the poor man's conflict handling. The fm mapping is an attempt to keep the f-menu accessible even when a conflicting vim mapping exists.

And I'd agree, this certainly not the best solution imaginable. It's a remain from when I first tried my hand at those conflicts.

As for how to do it correctly, I am still unsure. I will write up some of my thoughts and open another issue on that shortly.

@hecal3
Copy link
Owner

hecal3 commented Apr 20, 2016

Alright, that went faster than expected.
The errors should be fixed by 4093747.

By default conflicting mappings should now get displayed in the parent menu with a two letter mapping.
When g:leaderGuide_flatten is disabled they are displayed in a [fm] sub-menu like described above.

Notwithstanding this, conflict handling is a mess and could use a rework.

@SevereOverfl0w
Copy link
Author

Thanks for everything! Any remaining concerns are probably best continued in #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants