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

fix(keymap.helpers): improve _toggle* helper functions #1397

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jint-lzxy
Copy link
Collaborator

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

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]>
@ayamir
Copy link
Owner

ayamir commented Jan 19, 2025

I rarely use this keymap, use <leader>t for test in my own config.

@AngelontheRoad
Copy link
Contributor

AngelontheRoad commented Jan 21, 2025

Yeah they are global toggled keymaps not buffer keymaps . I'm sorry for my fault...

The keymaps are map to <leader>t for ease of memory. I think it's better to move them to editor.lua bc it's designed to clean off the editor if there're too many warnings and long inlay hints.

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

Successfully merging this pull request may close these issues.

3 participants