Code Monkey home page Code Monkey logo

Comments (2)

Horrih avatar Horrih commented on August 16, 2024

I am encountering this issue as well.

Turning off textDocument/hover dynamicRegistration works around the issue

I investigated a bit, comparing eglot (where it works)/lsp-mode (where is does not) : The main difference I saw was that lsp-mode declares textDocument/hover with dynamicRegistration: true where as eglot sets it to nil.

Setting this in lsp-mode.el : `lsp--client-capabilities()' to t seems to fix the issue for me.

 (hover . ((contentFormat . ["markdown" "plaintext"])
               (dynamicRegistration . nil)))

Speculation for a durable fix.

My guess would be that with dynamic registration, lsp-mode is notified too late that the server supports hover.

lsp-mode seems to enable eldoc at startup only, when `lsp-managed-mode' is turned on.

(when (lsp-feature? "textDocument/hover")
      (add-hook 'eldoc-documentation-functions #'lsp-eldoc-function nil t)
      (eldoc-mode 1))

With dynamic registration, I guess it would have to be turned on when receiving the message instead of at startup time ?

@yyoncho , would you have some advice on how to proceed with this ?

from lsp-java.

sdhoward avatar sdhoward commented on August 16, 2024

I appreciate the workaround. I edited the file in my melpa directory and byte-compiled it again. Works well.

I forgot to include which version of jdtls I'm on - right now it's 1.37.0. I don't know which version I had when it was working. Did the behavior change from a previous version of jdtls?

from lsp-java.

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.