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

Is it possible to use childframe for eglot? #112

Closed
FirstLoveLife opened this issue Sep 12, 2018 · 13 comments
Closed

Is it possible to use childframe for eglot? #112

FirstLoveLife opened this issue Sep 12, 2018 · 13 comments

Comments

@FirstLoveLife
Copy link

FirstLoveLife commented Sep 12, 2018

Just come from lsp-mode then found this great package, thanks for you great work!

I noticed unlike lsp-uii's childframe, eglot usually uses side-window(just like helm instead of minibuffer from ivy). I wonder is it possible to use childframe in eglot? Because I have to move my eyes frequently when using side-window.

@joaotavora
Copy link
Owner

I don't know what you mean by lsp-uii's childframe. What is side-window that eglot uses? I think you are talking about an Emacs feature, but it would be great if you post a screenshot so we can understand what you are talking about.

@FirstLoveLife
Copy link
Author

Sure.

lsp-ui:

image

image

eglot:

image

image

As the pictures show, lsp-ui can use child-frame, so it has window which is close to my code. Eglot's doc window is always at bottom, just like helm's default layout. IMO, eglot will be nicer if it can use child-frame.

@FirstLoveLife
Copy link
Author

FirstLoveLife commented Sep 24, 2018

BTW, I know it is just personal taste for the choice of childframe or side-window and childframe will never be a must. But if eglot can provide the option of childframe, I will pretty appreciate.

@whatacold
Copy link
Contributor

Hi @FirstLoveLife ,

I wonder is it eglot-help-at-point to get this help doc? It's handy.

I try this command in a c++ project, eglot prompts me a *eglot help* buffer,
so I'm not sure if it is the command.

@FirstLoveLife
Copy link
Author

@whatacold Good to know this function. But i think it is not as flexible as child-frame from lsp-ui

@whatacold
Copy link
Contributor

@FirstLoveLife ,

Maybe I haven't make me clear :(

Actually I want to know how do you show up the side window as shown in the picture, in the elgot manner?
It doesn't look like a *eglot-help* buffer as I mentioned.

@FirstLoveLife
Copy link
Author

It doesn't look like a eglot-help buffer as I mentioned.

Yes. With eglot-help-at-point, the eglot-help buffer is positioned side by side(just like what C-x 3 does.

Actually I want to know how do you show up the side window as shown in the picture, in the elgot manner?

I didn't do anything. eglot's default config use side-window above when any lsp is hooked by eglot, including ccls

@whatacold
Copy link
Contributor

whatacold commented Sep 26, 2018

I see now, it's a textDocument/hover response shown by eldoc-message function.
I haven't noticed it as I truncated the message, and now I can see the whole multi-line message
after setting (setq message-truncate-lines nil) , which is the default.

Thanks.

@joaotavora
Copy link
Owner

There seems to be a workaround, and also this kind of UI functionality isn't anything that Eglot should be supporting anyway (emacs's own display-buffer-alist or modes like company-quickhelp-mode seem more appropriate).

@casouri
Copy link
Contributor

casouri commented Dec 11, 2018

I cooked up some code to use childframe: https://github.com/casouri/eglot-doc

@joaotavora
Copy link
Owner

@casouri, could you maybe do this in eldoc-message-function exclusively (and thus provide this service to non-Eglot users) like I suggest in #111? It would also probably need less Eglot-specific code and custom requests.

@casouri
Copy link
Contributor

casouri commented Dec 11, 2018

Done. I removed eglot dependency and renamed it to eldoc-box.

@joaotavora
Copy link
Owner

Oh very nice, going to try it out with my minor modes

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

4 participants