Giter Site home page Giter Site logo

Comments (3)

iromise avatar iromise commented on May 26, 2024 2

Unexpectedly to encounter Professor Song @MaskRay, 2333.

from lsp-ui.

sebastiencs avatar sebastiencs commented on May 26, 2024

Thank for taking the time to write this.
Do you think the signature/type/(text with "language":"cpp"/"c"/"objc") has to be display by lsp-ui-doc too ?
As this text is supposed to be shown by lsp-ui-sideline, it would make it appears twice on screen.

from lsp-ui.

MaskRay avatar MaskRay commented on May 26, 2024

The old code just displays comments, not code, and IMHO is useful for users who do not use lsp-ui-sidebar.el or rely on eldoc-documentation-function for function types.

-         (--remove-first
-          (when (hash-table-p it)
-            (let ((lang (gethash "language" it)))
-              (or (string= language-id lang)
-                  ;; A language server supporting language-id "cpp" may respond MarkedString{"language":"c"}
-                  (and (string= language-id "cpp") (string= lang "c")))))
-          contents))

Maybe we can provide an option to control whether language related MarkedString ("c" "cpp" "objective-c"), cquery thinks its language-id is "cpp" but for .c file it emits "language":"c") should be rendered (via (lsp-ui-sideline--get-renderer (gethash "language" item))).

When hovering on a function, cquery displays its type with fully qualified function name. The whole type signature can be very long and having them in a child frame may be less appealing. Users are accustomed to eldoc and omitting them from lsp-ui-doc seems fine.

from lsp-ui.

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.