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 <50296129+Jint-lzxy@users.noreply.github.com>
|
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_diagnosticbc it's bug-prone.Also, what yall think about using
<leader>tfor 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