Coder Social home page Coder Social logo

eldoc support? about lsp-haskell HOT 5 CLOSED

emacs-lsp avatar emacs-lsp commented on August 24, 2024
eldoc support?

from lsp-haskell.

Comments (5)

walseb avatar walseb commented on August 24, 2024

I messed around with this a lot during the summer break. The problem is that the LSP.el requires a particular command from the LSP spec to be enabled on the LSP implementation (lsp-haskell in this case) for eldoc to work. This command isn't enabled in lsp-haskell (no idea if HIE supports it though). Lsp-ui can show the types without a problem because it requires a different command which is enabled on lsp-haskell. Same goes for the other lsp functions that can see types, like check docs. The way I solved this was by overwriting the lsp-ui function which is stealing the type info lsp-ui generates and then giving it to eldoc instead https://github.com/walseb/QualityEmacsConfig#hack-in-eldoc-support . But this problem could probably be fixed by just telling LSP.el that the eldoc request command is enabled, since it should be supported by HIE

from lsp-haskell.

mohkale avatar mohkale commented on August 24, 2024

wow, did not expect a solution/response that quickly. Thank you 😄 😄 😄 now let me just do some hardcore analysis blatant copy and paste of what you've shared.

from lsp-haskell.

walseb avatar walseb commented on August 24, 2024

No problem! There is one problem with it though atleast on my pc, changing lines sometimes results in eldoc not printing the type info. This could probably be fixed with a timer or something. It happens because lsp-ui sometimes doesn't fetch the type info in time for them to be printed by eldoc. Oh and sometimes there are also boxes on the right side of the screen. Those are remains of lsp-ui that I couldn't figure out how to remove

from lsp-haskell.

mohkale avatar mohkale commented on August 24, 2024

okay. pretty sure the command you mean is signature-help because it sounds like what it should and because its refrenced in the docstring for lsp--signature->eldoc-message. I also believe this might be an issue on haskell-ide-engine raised to adress it... though its been pushed back quite a bit 😭😭😭.

from lsp-haskell.

michaelpj avatar michaelpj commented on August 24, 2024

It sounds like the issue here is support for the signatureHelp requests in the language server, i.e. haskell-language-server. If the server supports it then lsp-mode should do the right thing. Could you open an issue in haskell-language-server, please (assuming it hasn't been fixed already)?

from lsp-haskell.

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.