-
Notifications
You must be signed in to change notification settings - Fork 202
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
Jump to definition broken with lua-language-server #711
Labels
Comments
Can you try #712? I don't know how to get the lua server working, but my patch seems to work for me (accepting |
@joaotavora I filed an issue against it, does it look accurate to you? I'm not that familiar with LSP internals. |
I'd say it looks fairly accurate. |
bhankas
pushed a commit
to bhankas/emacs
that referenced
this issue
Sep 18, 2022
Fix joaotavora/eglot#711. LocationLink was added in version 3.14 of the protocol and is sometimes used in lieu of Location for definition- and reference-related requests. * eglot.el (eglot--lsp-interface-alist): Update with LocationLink. (eglot-client-capabilities): Advertise textDocument.{definition,declaration,implementation,typeDefinition}.linkSupport. (eglot--lsp-xrefs-for-method): Accept LocationLinks. Co-authored-by: João Távora <joaotavora@gmail.com
bhankas
pushed a commit
to bhankas/emacs
that referenced
this issue
Sep 19, 2022
Fix joaotavora/eglot#711. LocationLink was added in version 3.14 of the protocol and is sometimes used in lieu of Location for definition- and reference-related requests. * eglot.el (eglot--lsp-interface-alist): Update with LocationLink. (eglot-client-capabilities): Advertise textDocument.{definition,declaration,implementation,typeDefinition}.linkSupport. (eglot--lsp-xrefs-for-method): Accept LocationLinks. Co-authored-by: João Távora <joaotavora@gmail.com
bhankas
pushed a commit
to bhankas/emacs
that referenced
this issue
Sep 19, 2022
Fix #711. LocationLink was added in version 3.14 of the protocol and is sometimes used in lieu of Location for definition- and reference-related requests. * eglot.el (eglot--lsp-interface-alist): Update with LocationLink. (eglot-client-capabilities): Advertise textDocument.{definition,declaration,implementation,typeDefinition}.linkSupport. (eglot--lsp-xrefs-for-method): Accept LocationLinks. Co-authored-by: João Távora <joaotavora@gmail.com #712: joaotavora/eglot#712 #711: joaotavora/eglot#711
jollaitbot
pushed a commit
to sailfishos-mirror/emacs
that referenced
this issue
Oct 12, 2022
Fix joaotavora/eglot#711. LocationLink was added in version 3.14 of the protocol and is sometimes used in lieu of Location for definition- and reference-related requests. * eglot.el (eglot--lsp-interface-alist): Update with LocationLink. (eglot-client-capabilities): Advertise textDocument.{definition,declaration,implementation,typeDefinition}.linkSupport. (eglot--lsp-xrefs-for-method): Accept LocationLinks. Co-authored-by: João Távora <joaotavora@gmail.com GitHub-reference: close joaotavora/eglot#712
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LSP transcript
Backtrace (mandatory, unless no error message seen or heard):
Minimal configuration (mandatory)
Start emacs with
then run this:
then have a folder with two files inside:
foo.lua
and bar.lua
Now putting point at
foo.b|az()
(the | indicates the point), and running M-. should jump to the definition of baz in foo.lua, but it instead errors out withI did some digging, and it looks like the issue is here: https://github.com/joaotavora/eglot/blob/master/eglot.el#L2167 . Going off the names, the function appears to expect a
Location
response to thetextDocument/definition
request, but instead gets aLocationLink[]
. I'm not sure if this is a bug in eglot or in lua-language-server since the spec here: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition , says that theLocationLink[]
response was only added recently and should be feature tested for, if I am reading it correctly.The text was updated successfully, but these errors were encountered: