all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Ray <emacsray@gmail.com>
Cc: 29619@debbugs.gnu.org
Subject: bug#29619: Fwd: [xref.el] Add `xref-find-references` to `xref-prompt-for-identifier`
Date: Sun, 10 Dec 2017 18:57:56 +0200	[thread overview]
Message-ID: <0e97609a-eefc-6e0d-ce2b-6c69651d9990@yandex.ru> (raw)
In-Reply-To: <CAN30aBHFu3fyC9vtj2J177ijWFVmo0skWGw5E1sbPwPhfrd2Lg@mail.gmail.com>

On 12/9/17 7:52 PM, Ray wrote:
> Thanks for being open to change the default if more people feel the same.
> 
> With the xref system people use drifting from tag based
> (ctags,etags,GNU GLOBAL,cscope,...) tools to Language Server Protocol
> (cquery, rls, ...),
> a single identifier without position has become insufficient to
> describe the one the user wants to look up. For example, a local
> variable/struct/lambda `foo` may exist
> in different functions.

That's fine, actually, and as designed. As long as the different global 
identifiers can be represented uniquely as strings (but using text 
properties for e.g. a local variable at point is good too).

> I'm using a C++ language server called cquery. This is what I get (for
> the argument `identifier`) when I hit the key bound to
> `xref-find-definitions`:
> 
> #("QueryDatabase" 0 13 (fontified t ref-params (:textDocument (:uri
> "file:///home/maskray/Dev/Util/cquery/src/query_utils.h") :position
> (:line 11 :character 54) :context (:includeDeclaration :json-false))
> def-params (:textDocument (:uri
> "file:///home/maskray/Dev/Util/cquery/src/query_utils.h") :position
> (:line 11 :character 54))))
> 
> Here the text properties are more useful than the identifier itself,
> because LSP uses position instead of identifier to sending requests to
> the language server.
> https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textdocumentpositionparams

So it doesn't actually let you choose? Only supports the identifier at 
point?





  reply	other threads:[~2017-12-10 16:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08 21:13 [xref.el] Add `xref-find-references` to `xref-prompt-for-identifier` Ray
2017-12-08 21:27 ` bug#29619: Fwd: " Ray
2017-12-09 15:25   ` Dmitry Gutov
2017-12-09 17:52     ` Ray
2017-12-10 16:57       ` Dmitry Gutov [this message]
2017-12-11  7:18         ` Fangrui Song
2017-12-11 10:38           ` Dmitry Gutov
2018-01-21 22:20   ` guillaume papin
2017-12-09  8:29 ` Eli Zaretskii
2017-12-09  8:59   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e97609a-eefc-6e0d-ce2b-6c69651d9990@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=29619@debbugs.gnu.org \
    --cc=emacsray@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.