-
Notifications
You must be signed in to change notification settings - Fork 462
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
fix(keymap.helpers): improve _toggle*
helper functions
#1397
Conversation
This commit refined the two `_toggle*` functions to cut down redundancy, reworded msgs, and made sure 0/1 are not used in `_toggle_diagnostic` bc it's bug-prone. Signed-off-by: Jint-lzxy <[email protected]>
I rarely use this keymap, use |
Yeah they are global toggled keymaps not buffer keymaps . I'm sorry for my fault... The keymaps are map to |
My two cents here is I don't think this rlly fits with other keymaps bc these two are specific to LSP and should only be active when a language server is actually attached to the buffer. That's why I'm thinking it might make more sense to use something like
Given the above I think it'd make more sense to move them to |
My point is that you won't use them editing a text file bc there's no lsp information at all, and most importantly, there's no error while using these keymaps on editing a non-lsp-attached file. Moving these keymaps to
|
Agree to modify these keymaps to |
This commit refined the two
_toggle*
functions to cut down redundancy, reworded msgs, and made sure 0/1 are not used in_toggle_diagnostic
bc it's bug-prone.Also, what yall think about using
<leader>t
for these? Cuz this seems quite unique compared to other LSP keymaps...? Also the term "toggle in buffer" feels off and may be better as "(global) toggle" IMO