ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.84k stars 455 forks source link

What does `+prefix` mean in which-key's popup? #1086

Closed Winson-030 closed 5 months ago

Winson-030 commented 7 months ago

Version confirmation

Following prerequisites

Neovim version

NVIM v0.9.4

Branch info

main (Default/Latest)

Minimal (user) folder structure required to reproduce the issue

main 分支的原始配置,没有修改

Minimal config with steps on how to reproduce the issue

main 分支的原始配置,没有修改

Expected behavior

系统是macos,终端是iterm2,使用的字体是 jetbrainmono 问题已经在图片中圈出,prefix 文字丢失(这样表达是否准确?),nerd font 不显示。 请问我需要到哪个文件进行修改?

Additional information

neovim fix

ayamir commented 7 months ago

We replaced the original vim icon to neovim icon in #1072 because nerd font introduced it. You can download the latest nerd font here: https://github.com/ryanoasis/nerd-fonts/releases/latest. The normal display: image

Winson-030 commented 7 months ago

We replaced the original vim icon to neovim icon in #1072 because nerd font introduced it. You can download the latest nerd font here: https://github.com/ryanoasis/nerd-fonts/releases/latest. The normal display: image

nerd font 的问题经过版本更新后成功解决🎉! 还有一个问题👇 图片右下角的 “+prefix” 如何修改选项标题?为什么你提供的截图上 “+prefix” 也没有显示标题?

Jint-lzxy commented 7 months ago

It means those combinations are initials or prefixes, and they (for example, <leader>b) aren't bound to any definition. If u continue typing, for instance, b, u'll get to the next level (that is, the mappings starting with <leader>b). And in this case u should also see <leader> ▸ +Bufferline commands in the command line. u cannot add descriptions to prefixes.

vollowx commented 7 months ago

IMO we can add some key-mappings like <Leader>b with label of sub: Buffers that binds to <Ignore> for better accessibility for new users.

Jint-lzxy commented 7 months ago

IMO we can add some key-mappings like <Leader>b with label of sub: Buffers that binds to <Ignore> for better accessibility for new users.

But in this case, users wouldn't be able to trigger which-key's popup by typing <leader>b. Or maybe we could consider just registering this mapping in which-key?

vollowx commented 7 months ago

exactly what I mean :100:

Cyberczy commented 6 months ago

IMO we can add some key-mappings like <Leader>b with label of sub: Buffers that binds to <Ignore> for better accessibility for new users.

like this? image

image

CharlesChiuGit commented 6 months ago

like this?

wooow! this looks nice! send the pr!

Cyberczy commented 6 months ago

like this?

wooow! this looks nice! send the pr!

Where should I place the configuration for modifying these +prefix fields? Should I create a separate file for it?

CharlesChiuGit commented 6 months ago

Where should I place the configuration for modifying these +prefix fields? Should I create a separate file for it?

i'm not sure how u config it, but i think it should belong to lua/modules/configs/tool/which-key.lua or lua/keymap/helpers.lua?

u can even send a pr as draft first, then we can see the actual code and discuss the details.

Cyberczy commented 6 months ago

Where should I place the configuration for modifying these +prefix fields? Should I create a separate file for it?

i'm not sure how u config it, but i think it should belong to lua/modules/configs/tool/which-key.lua or lua/keymap/helpers.lua?

u can even send a pr as draft first, then we can see the actual code and discuss the details.

I have submitted the pull request, It's just a demo