m4xshen / hardtime.nvim

Establish good command workflow and quit bad habit
MIT License
1.38k stars 26 forks source link

Invisible hint messages when showmode is enabled #11

Closed thimc closed 1 year ago

thimc commented 1 year ago

Hi,

Lovely plugin, thanks for sharing! After a few minutes of playing around I noticed that when the set showmode setting is enabled, the hint messages are pretty much invisible.

I haven't really dug in to the code yet to see how these are printed but I would assume it's the regular print() function that is used. Perhaps one way to solve this would be to display the messages in a floating window?

m4xshen commented 1 year ago

I can't reproduce your issue. Actually the showmode option is on by default in Neovim. Could you please provide more information?

thimc commented 1 year ago

That's weird, I specifically tried this with the c$ motion which should say something along the lines of "Use C instead of c$".

I may have to try this with a default config of Neovim to verify that there isn't anything else that does this

m4xshen commented 1 year ago

Hey did you find out what causes the problem?

thimc commented 1 year ago

No, sadly not. I haven't been able to find what's causing it. I did try a vanilla neovim config with just packer and your plugin but that didn't help at all.

m4xshen commented 1 year ago

Could you provide code that you setup this plugin?

thimc commented 1 year ago

Well sure, I use the snippet provided in the README. Besides that there's packer but I seriously doubt that is the thing causing this.

require("hardtime").setup()

m4xshen commented 1 year ago

So it is not the problem of showmode?

thimc commented 1 year ago

Well, I don't know. My config hasn't configured this in the slightest. The thing is I get the message at the bottom of the screen for all other actions besides those that enters INSERT or VISUAL mode.

m4xshen commented 1 year ago

I get the message at the bottom of the screen for all other actions besides those that enters INSERT or VISUAL mode.

So you got hint messages for use - instead of k^ but not use C instead of c$. Am I right?

thimc commented 1 year ago

Unfortunately not, I only see the -- INSERT -- message weirdly enough.

m4xshen commented 1 year ago

Can you see the warning message when pressing j repeatedly?

thimc commented 1 year ago

Yes

m4xshen commented 1 year ago

What Neovim version are you using?

ErenKyojin commented 1 year ago

Same issue here! With version 0.9.1-1 of neovim.

m4xshen commented 1 year ago

@ErenKyojin did you try out hardtime.nvim without other plugin and config?

ErenKyojin commented 1 year ago

@ErenKyojin did you try out hardtime.nvim without other plugin and config?

I did, and the issue still persists (also i'm using lazy, don't think it should matter tho)

fynnfluegge commented 1 year ago

Facing the same issue. Notifications are visible, hints are invisible. The other way round would be fine for me 😅 I am using heirline btw, had the feeling this causes it until I saw this issue here.

m4xshen commented 1 year ago

The problem is that the mode message replaces the hint message. Here are some solutions:

  1. Display the mode on status line and set showmode to false. You can do this with some statusline plugin such as lualine.nvim.
  2. Set the cmdheight to 2 so that the hint message won't be replaced by mode message.
  3. Use nvim-notify to display hint messages on the right top corner instead of commandline.