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

Show context of references #52

Open
brotzeit opened this Issue Jul 28, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@brotzeit
Contributor

brotzeit commented Jul 28, 2018

eglot:
eglot
lsp-mode:
lsp-mode

Eglot also displays the definition as a reference.

@joaotavora

This comment has been minimized.

Show comment
Hide comment
@joaotavora

joaotavora Jul 28, 2018

Owner

Hmmm, right, more or less. To understand what you mean, exactly, tell me what you did before getting the prompt in both situations. Does it also happen without helm?

Eglot also displays the definition as a reference

Are you describing a second problem here?

Owner

joaotavora commented Jul 28, 2018

Hmmm, right, more or less. To understand what you mean, exactly, tell me what you did before getting the prompt in both situations. Does it also happen without helm?

Eglot also displays the definition as a reference

Are you describing a second problem here?

@brotzeit

This comment has been minimized.

Show comment
Hide comment
@brotzeit

brotzeit Jul 28, 2018

Contributor

helm-xref is a package I wrote for xref results. I just used xref-find-references for both modes.

Does it also happen without helm?

Yes.

Are you describing a second problem here?

eglot displays one more line than lsp-mode, the definition. That's the first line. It seems this was done for a reason since it is displayed seperately from the other references of that file.

Contributor

brotzeit commented Jul 28, 2018

helm-xref is a package I wrote for xref results. I just used xref-find-references for both modes.

Does it also happen without helm?

Yes.

Are you describing a second problem here?

eglot displays one more line than lsp-mode, the definition. That's the first line. It seems this was done for a reason since it is displayed seperately from the other references of that file.

mkcms added a commit to mkcms/eglot that referenced this issue Sep 8, 2018

Close joaotavora#52: Use entire line as xref summary when possible
* eglot.el (eglot--xref-make): Make the item with summary being the
  whole line at given location.
(xref-backend-identifier-at-point):
(xref-backend-definitions):
(xref-backend-references): Pass Location plist to eglot--xref-make.

cmm pushed a commit to cmm/eglot that referenced this issue Oct 5, 2018

Close joaotavora#52: Use entire line as xref summary when possible
* eglot.el (eglot--xref-make): Make the item with summary being the
  whole line at given location, when possible
(eglot--locations-to-xrefs,eglot--path-xrefs,eglot--buf-xrefs):
Convert location list to xref list, trying to open each file just once.
(xref-backend-identifier-at-point):
(xref-backend-definitions):
(xref-backend-references): Pass the list of locations to
eglot--locations-to-xrefs.

cmm pushed a commit to cmm/eglot that referenced this issue Oct 7, 2018

Close joaotavora#52: Use entire line as xref summary when possible
* eglot.el (eglot--xref-make): Make the item with summary being the
  whole line at given location, when possible
(eglot--locations-to-xrefs,eglot--path-xrefs,eglot--buf-xrefs):
Convert location list to xref list, trying to open each file just once.
(xref-backend-identifier-at-point):
(xref-backend-definitions):
(xref-backend-references): Pass the list of locations to
eglot--locations-to-xrefs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment