Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using vim.lsp.buf.hover() breaks lightline. #673

Closed
RenuzitV opened this issue Mar 15, 2024 · 8 comments
Closed

Using vim.lsp.buf.hover() breaks lightline. #673

RenuzitV opened this issue Mar 15, 2024 · 8 comments

Comments

@RenuzitV
Copy link

RenuzitV commented Mar 15, 2024

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

@RenuzitV
Copy link
Author

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.

@itchyny
Copy link
Owner

itchyny commented Mar 16, 2024

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?

@RenuzitV
Copy link
Author

RenuzitV commented Mar 18, 2024

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

@itchyny
Copy link
Owner

itchyny commented Mar 18, 2024

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

@adiSuper94
Copy link

adiSuper94 commented Apr 22, 2024

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

@itchyny
Copy link
Owner

itchyny commented Apr 22, 2024

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

@adiSuper94
Copy link

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

@RenuzitV
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants