tamton-aquib / staline.nvim

A modern lightweight statusline and bufferline plugin for neovim in lua.
MIT License
380 stars 17 forks source link

Staline seems to conflict with lsp hover #41

Closed rychardvale closed 2 years ago

rychardvale commented 2 years ago

Hey all!

I'm trying to setup staline but for some reason it seems to conflict with lsp window popup. When I try to run vim.lsp.buf.hover() nothing happens, only when run it again then the popup appears but then it jumps to the floating window.

Any idea what is going on?

tamton-aquib commented 2 years ago

Heyyo @rychardvale

heres what docs for hover() say: image i think its intended.

If you want to turn it off:

vim.lsp.handlers["textDocument/hover"] =  vim.lsp.with( vim.lsp.handlers.hover, {border = border})
rychardvale commented 2 years ago

Oh it is supposed to jump to the window, but what is happening is that it doesn't show the floating window on the first run of the hover() only when I run it twice.

When I run the command once and move with j or k, I can see the window flashing really fast. I'll try to record it and post it here.

rychardvale commented 2 years ago

You can see it flashing only sometimes due to recording being 60hz.

https://user-images.githubusercontent.com/54805553/189159378-9cef7bb9-df85-4ba5-98d4-eeab25a12950.mp4

I searched for conflicting remaps but couldn't find any, and it would be weird since staline doesn't map any key.

tamton-aquib commented 2 years ago

Are you sure the problem is from staline? 😅

Also is your neovim config on git?

rychardvale commented 2 years ago

Now it is

I must be doing something wrong :face_exhaling:

tamton-aquib commented 2 years ago

Tried 2 of my configs and there was nothing wrong. But after trying your config weirdly is happens 🤔 I have tried other statuslines with your config but theyre working perfectly.

I have no idea whats causing it but i'll try something this week 😅

rychardvale commented 2 years ago

Yeah man, no worries, I don't know what is wrong but I'll keep tweaking things around to see if I spot the bug. Thanks!

rychardvale commented 2 years ago

Hey! Managed to get it to work a few days ago, apparently the bug happens when I load staline after setting up my colorscheme... So there's that!

tamton-aquib commented 2 years ago

Heyyo @rychardvale tysm, i tried bisecting your config but couldn't find anything weird. 😅 Thank you again.