company-lsp icon indicating copy to clipboard operation
company-lsp copied to clipboard

jump to candidate definition

Open Trevoke opened this issue 6 years ago • 3 comments

This is something about the interaction between company-lsp and lsp-mode. lsp-mode does jump-to-defnition very well through xref-find-definitions, but I can't quite make it work with company-lsp. The best I can get is to jump to the top of the file that contains the candidate. Any advice?

Trevoke avatar Apr 07 '18 18:04 Trevoke

I'm not sure if I fully understand your question. Are you trying to jump to the definition of a candidate without adding it to the file content? If that's the case I don't think it's possible. The LSP protocol only provides API for getting the location of the definition at a given point in a file (see the request for textDocument/definition in the spec).

You can work around it by completing the candidate and use lsp-mode to jump to the definition.

tigersoldier avatar Apr 08 '18 04:04 tigersoldier

Okay, thanks. I will try that, I think I can get that to work.

Trevoke avatar Apr 09 '18 17:04 Trevoke

I spent some time trying to get this to work and was not successful. I think we can get it to work, and it requires some changes in this plugin. I'd like to request this as a feature?

Trevoke avatar May 13 '18 23:05 Trevoke