-
Notifications
You must be signed in to change notification settings - Fork 6
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
Integration with elisp-mode #1
Comments
It shouldn't be too hard either: a lot of necessary code for detecting the current symbol's type is already there (used now for completion). One part where I'm not sure about, though, is how to reconcile the auto-detection of the symbol's type with reading its name with completion (which we do even for |
Hi Stefan! I'm flattered you're trying my package :) Sorry I didn't respond before: turns out that new GitHub projects don't have the creator watching the repo by default. elisp-def goes a lot further than elisp-mode for detecting the type of a symbol. It handles anaphora, local variables and docstring references, amongst other things (see the readme for the full list). The macro expansion and AST walking are sufficiently non-trivial that I wanted to get a good test suite and some users to shake out the bugs. I'd be willing to look at moving this to elisp-mode in a few months, but I'd like it to have more time baking first :) |
Hi Wilfred, Having rediscovered this package, I'm curious: do you still plan to look into integrating this into Emacs someday? It looks very useful, but it would be easier to integrate it into users' workflows if it were part of, e.g. |
Seconding this. It would be a lot more convenient to use if it could integrate into |
@Wilfred: There might be a misunderstanding. I did not suggest to
integrate this code into `elisp-mode.el` or into Emacs (it's probably
not a bad idea either, but I must admit I haven't thought about how this
would go). Instead, I'm suggesting you change your package such that it
presents itself as an Xref backend.
More concretely it means your package would do something like
(add-hook 'emacs-lisp-mode-hook #'elisp-def--setup)
(defun elisp-def--setup ()
(add-hook 'xref-backend-functions #'elisp-def--xref-backend nil t))
(defun elisp-def--xref-backend () 'elisp-def)
And then
(cl-defmethod xref-backend-definitions (_ (eql elisp-def) id) ...)
(cl-defmethod xref-backend-references (_ (eql elisp-def) id) ...)
...
…-- Stefan
|
Any chance this could be integrated with elisp-mode's xref support rather than replacing it?
The text was updated successfully, but these errors were encountered: