itchyny/lightline.vim

Using `vim.lsp.buf.hover()` breaks lightline.

RenuzitV opened this issue · 8 comments

Before using the command, this is what my status bar looks like.
image

After using it, here's what it looks like:
image

this problem only happens if there is some kind of definition to the hovered text, which could be any or anything. if the window appears the lightline status disappears.

Fix:

I've been able to fix this annoying issue by using `.hover()` twice (shift KK or any keybind you use), then :q to restore the status bar. Otherwise, I'll have to exit nvim and go back.

System

I'm using Windows 11, Nvim

Here's my list of plugins:
Total: 35 plugins

Loaded (35)
● cellular-automaton.nvim 0.48ms  start
● cloak.nvim 1.61ms  start
● cmp-buffer 1.26ms  nvim-lspconfig
● cmp-cmdline 1.38ms  nvim-lspconfig
● cmp-nvim-lsp 1.15ms  nvim-lspconfig
● cmp-path 1.36ms  nvim-lspconfig
● cmp_luasnip 1.43ms  nvim-lspconfig
● copilot.vim 1.68ms  start
● editorconfig.nvim 1.51ms  start
● fidget.nvim 1.53ms  nvim-lspconfig
● FixCursorHold.nvim 1.95ms  neotest
● friendly-snippets 0.97ms  LuaSnip
● harpoon 5.19ms  start
● lazy.nvim 7.51ms  init.lua
● lightline.vim 1.11ms  start
● LuaSnip 9.51ms  neogen
● mason-lspconfig.nvim 1.15ms  nvim-lspconfig
● mason.nvim 1.14ms  nvim-lspconfig
● neogen 10.33ms  start
● neotest 21.37ms  start
● neotest-plenary 1.61ms  neotest
● neotest-vitest 1.67ms  neotest
● nvim-cmp 6.26ms  start
● nvim-html-css 14.52ms  start
● nvim-lspconfig 51.1ms  start
● nvim-treesitter 11.28ms  nvim-html-css
● plenary 0.45ms  start
● plenary.nvim 0.38ms  nvim-html-css
● rose-pine 34.01ms  start
● telescope.nvim 10.36ms  start
● trouble.nvim 4.21ms  start
● undotree 1.21ms  start
● vim-commentary 0.77ms  start
● vim-fugitive 4.1ms  start
● zen-mode.nvim 0.73ms  start

This is most likely an Nvim editor issue and not related to lightline, but I think if we can have a faq for this issue here it would help more people fix this.

I can't reproduce the problem and the bug seems to be fixed in Neovim master version. Are you using the v0.9.5 version? Can you test with the master version?

I'm using version 0.9.5, as indicated by the Nvim's editor. I had just installed my configs on another Windows machine, which also has the same problem. Also, it seems like switching to another file (using Harpoon) or opening a new tab with :tabnew, anything that refreshes the status bar will do the trick.

Maybe it's something to do with my plugins? I've tried to edit as much as I could to "default values" for each plugin, but I can't seem to make the problem go away.
Anyways, Here's my configs if you want to look into it:
https://github.com/RenuzitV/nvim-scripts

I believe this is a bug of Neovim fixed after the 0.9.5 release. So worth trying the latest version.

Facing this same issue in neovim (0.9.5)
Tested both on macos Ventura and Ubuntu 22 (jammy jelly).

I know neovim 0.9.5 has a bug around this issue. Please upgrade to the latest master version.

@itchyny got it. Just tested in nightly. It works.
Thanks!

Sorry for ghosting the issue after opening it, I had a lot going on and got busy quickly.

I am closing the issue for now.