forth-mode
forth-mode copied to clipboard
Add support for xref
I don't know much about how xref providers are implemented, but the starting point is the variable xref-backend-functions which should return an xref backend that is able to find symbols in the current runtime.
Source code is documentation:
https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/xref.el
A basic Xref backend could be written that manually parses buffer for definitions, but are there any more generic tools (aside from Etags) that could provide the necessary information?
One idea I had when I started this project is that the Lisp code should be able to communicate with the inferior Forth for information. E.g. I seem to recall some Forths have built-in tools for cross referencing.