ayamir / nvimdots

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

bug: <leader> doesn't work #1141

Closed Ahwxorg closed 5 months ago

Ahwxorg commented 6 months ago

Version confirmation

Following prerequisites

Not a user config issue

Neovim version

NVIM v0.9.5 release

Operating system/version

I am on Linux kernel 6.6.0, running Gentoo GNU/Linux aarch64 with glibc

Terminal name/version

foot version: 1.16.2 -pgo +ime +graphemes -assertions

$TERM environment variable

xterm-256color

Branch info

main (Default/Latest)

Fetch Preferences

HTTPS (use_ssh = false)

How to reproduce the issue

  1. Clone repo
  2. Try
  3. Leader does not work

Expected behavior

Leader works

Actual behavior

Leader does not work

Additional information

No response

CharlesChiuGit commented 6 months ago

It mostly b/c u haven't set those leader key in your terminal, i.e. your terminal doesn't pass the keybings to nvim.

u can try another terminal or study how to setup your terminal correctly.

Ahwxorg commented 6 months ago

Doesn't work with neither Kitty nor Foot, works on my old Neovim config...

CharlesChiuGit commented 6 months ago

have u clear the caches of the old nvim config? it might cause some issues.

CharlesChiuGit commented 6 months ago

u r using our default leader, right?

our leader key is space. what's your leader key from your old config?

Ahwxorg commented 6 months ago

have u clear the caches of the old nvim config? it might cause some issues.

Yes, I cleared ~/.local/share/nvim.

Ahwxorg commented 6 months ago

u r using our default leader, right?

Also yes, I did not change anything. Should be space.

CharlesChiuGit commented 6 months ago

u might what to describe more details of your situation; otherwise, it's pretty hard to help u, since it works for most of the ppl.

Ahwxorg commented 6 months ago

What do you need to know?

You can check the configs of everything I use over at my dotfiles repository

Jint-lzxy commented 6 months ago

What do you need to know?

Can u include a short clip of pressing <Space> in normal mode? Since normally, there should be a WhichKey prompt showing up. Also, if u press <Space> in showkey -a what do u see?

Ahwxorg commented 6 months ago

out

Ahwxorg commented 6 months ago

Ignore the notifications lmao

Ahwxorg commented 6 months ago

image Running :WhichKey shows this ^^

CharlesChiuGit commented 6 months ago

hmmm, i still have no idea why leader-key doesn't trigger. can u tried map leader-key to , or other keys and give it another try?

guess u r using hyperland lol nice config btw lol

Ahwxorg commented 6 months ago

can u tried map leader-key to , or other keys and give it another try?

How do I do that :full_moon_with_face:

guess u r using hyperland lol nice config btw lol

Hyprland is sick indeed. Also runs flawlessly on my M2 MacBook, which anything using Xorg does not at all. Thanks :)

Jint-lzxy commented 6 months ago

Well TBH, I have absolutely no idea why we mapped \<leader> to \<Nop>. But anyway, does removing the following two lines solve the problem? https://github.com/ayamir/nvimdots/blob/f2cf03b254c21a69d3654c2c05014cd411ac14e2/lua/core/init.lua#L78-L79

CharlesChiuGit commented 6 months ago

Well TBH, I have absolutely no idea why we mapped to . But anyway, does removing the following two lines solve the problem?

I think we set those two lines to <Nop> when we were still using , as leader?

In my personal config, i set leader keys like this. image

Jint-lzxy commented 6 months ago

I think we set those two lines to <Nop> when we were still using , as leader?

Aha, that makes sense lol I guess the original intention was to prevent advancing a character when pressing \<Space>, but now it's obviously not necessary anymore XD

ayamir commented 6 months ago

Gentoo user too :) (with awesome wm and kitty), but never encounter this problem, it's weird.

Ahwxorg commented 5 months ago

Well TBH, I have absolutely no idea why we mapped to . But anyway, does removing the following two lines solve the problem?

https://github.com/ayamir/nvimdots/blob/f2cf03b254c21a69d3654c2c05014cd411ac14e2/lua/core/init.lua#L78-L79

I removed those, set the leader to ,, set it to again and now it works... Thanks!

Ahwxorg commented 5 months ago

Unrelated, is there an easy way to turn plugins on/off? I don't really want to use Codeium on every file, and I'd like to disable TabNine completely.

Ahwxorg commented 5 months ago

image TabNine also kinda throws errors.

Ahwxorg commented 5 months ago

Gentoo user too :) (with awesome wm and kitty), but never encounter this problem, it's weird.

I run Gentoo on everything except the Raspberry Pi's I own, since I don't like compiling on PoE fed devices :). Even homeserver/most VMs unless otherwise is needed. Gentoo is life :)

I use Foot though, I dislike Kitty, but keep it around since the colorscheme is perfect for kernel configurating lmao

CharlesChiuGit commented 5 months ago

TabNine also kinda throws errors.

i think u need to make it executable?

CharlesChiuGit commented 5 months ago

Unrelated, is there an easy way to turn plugins on/off? I don't really want to use Codeium on every file, and I'd like to disable TabNine completely.

check our wiki: https://github.com/ayamir/nvimdots/wiki/Usage

Ahwxorg commented 5 months ago

check our wiki: https://github.com/ayamir/nvimdots/wiki/Usage

Oh, yeah, sorry. I should've done that earlier...