Skip to content
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

[WIP] Proof of concept Xref backend #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Gavinok
Copy link

@Gavinok Gavinok commented Feb 4, 2023

Simple backend that basically just queries the REPL for the location of a given symbol. Works surprisingly well.

Simple backend that basically just queries the REPL for the location
of a given symbol. Works surprisingly well.
@Gavinok
Copy link
Author

Gavinok commented Feb 4, 2023

I still need to write a parser for (env) to gather keys to use with appropose but this does the bare minimum

Copy link
Contributor

@eriksvedang eriksvedang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very cool!! I don't get this to work either though. If I have a buffer with some code and do run-carp, should I just be able to put the point on a symbol and press M-. to go to the definition, or is there some more step?

@Gavinok
Copy link
Author

Gavinok commented Feb 4, 2023

@eriksvedang you would need to load the file into the repl (load "path/to/file") then since the :i will (usually) be able to give the location of the definition M-. should start working.

Here is a quick screencast of it in action

carp-xref2

@Gavinok
Copy link
Author

Gavinok commented Feb 6, 2023

Hmm this doesn't seem to be as consistent as I had hoped. I am having trouble getting this to work seamlessly on base emacs. I'll try and improve the UX and ping you when I think it's ready

@Gavinok Gavinok changed the title Proof of concept Xref backend [WIP] Proof of concept Xref backend Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants