Giter VIP home page Giter VIP logo

Comments (8)

dpetka2001 avatar dpetka2001 commented on July 18, 2024 1

This is what noice does (overwriting the LSP buffer handler) and you can use the option I mentioned earlier to silence those notifications. If you don't use noice, then you have to do something similar in your personal configuration on your own.

from lazyvim.

dpetka2001 avatar dpetka2001 commented on July 18, 2024

You must have multiple LSP servers attached to the buffer and not everyone has information about the symbol under the cursor. I noticed this when I had pyright and jedi and had disabled HoverProvider from pyright in favor of jedi. You can enable an option in noice.nvim to not show these messages. opts.lsp.hover.silent = true

For more info read noice's docs.

from lazyvim.

dpetka2001 avatar dpetka2001 commented on July 18, 2024

I think it's because of nvim-notify. Try disabling it and see if you observe same behavior.

from lazyvim.

kapral18 avatar kapral18 commented on July 18, 2024

without nvim-notify it prints twice to messages stack

image

and if I disable all plugins and extras and disable nvim-notify I see nothing at all on hover

but switching off nvim-notify is not an optimal solution here because nvim-notify is needed. Any js/ts buffer has at any given moment at least 3 lsp clients working at the same time to complete missing parts of each other, eslint + tsserver + cssls, so I am surprised that this is a an actual problem

from lazyvim.

dpetka2001 avatar dpetka2001 commented on July 18, 2024

Are you able to reproduce this with default LazyVim installation?

from lazyvim.

dpetka2001 avatar dpetka2001 commented on July 18, 2024

This is default behavior for Neovim vim.lsp.buf.hover(). See here where it is defined. It calls request, which is the function just above, which returns vim.lsp.buf_request(). That in turn is defined here and you can see from the comments that

--- Sends an async request for all active clients attached to the
--- buffer.

Since it sends the request to all active clients in the buffer, the ones that don't have information for the symbol under the cursor send back Information not available. If there are more than one server which doesn't have information available you will see more than one notification.

So, not a LazyVim bug it seems.

from lazyvim.

folke avatar folke commented on July 18, 2024

Noice does the same as the default lsp handler

from lazyvim.

kapral18 avatar kapral18 commented on July 18, 2024

@dpetka2001 thanks for checking

This resolves the issue for me for good

neovim/neovim#20457 (comment)

do you think this can be added to lazyvim as well?

from lazyvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.