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

Common Lisp Go To Definition #606

Open
mjcurciojr opened this issue Sep 10, 2024 · 2 comments
Open

Common Lisp Go To Definition #606

mjcurciojr opened this issue Sep 10, 2024 · 2 comments
Labels
client-commonlisp enhancement New feature or request

Comments

@mjcurciojr
Copy link

mjcurciojr commented Sep 10, 2024

Hi @Olical,

I noticed that currently go to definition is not supported for common lisp, attempting to use the binding on some symbol results in the error message:

E5108: Error executing lua: Vim:Error executing Lua callback: Conjure client 'conjure.client.common-lisp.swank' doesn't support function: def-str
stack traceback:
	[builtin#19]: at 0x010359758c
	[C]: at 0x0102b8e91c
stack traceback:
	[C]: at 0x0102b8e91c

Similar to the common lisp completions, if desired, we can leverage a feature of swank basically 1 to 1 in order to add this capability by using SWANK:FIND-DEFINITION-FOR-EMACS. Here's a sample request-response:

Read: (:EMACS-REX (SWANK:FIND-DEFINITIONS-FOR-EMACS "compile-plan") "PIKE" :REPL-THREAD 44)
Write: (:RETURN
 (:OK
  (("(DEFGENERIC COMPILE-PLAN
    (PS))"
    (:ERROR
     "Error: DEFINITION-SOURCE of generic-function COMPILE-PLAN did not contain meaningful information."))
   ("(DEFMETHOD COMPILE-PLAN PIKE-SESSION)"
    (:LOCATION
     (:FILE "/home/steve/mtk/workspaces/primary/pike/src/compile-plan.lisp")
     (:POSITION 1940)
     (:SNIPPET "(defmethod compile-plan ((ps pike-session))
  \"Top-level compilation function. This prepares
   Pike for execution, and may throw errors if problems
   are detected.\"

  ;; TODO - check success for each for each of these!
  ;; Use signals, etc. Make sure e")))))
 44)

(Sourced from Neil Lindquist's great repository, sample found here).

Is this something that is currently on the roadmap or that is being worked on, or is this something that we'd be interested in having in Conjure proper? I understand from reading other issues that some capabilities may be better left to plugins. If it is something we are wanting then I am more than happy to take a swing at the first PR as well.

Thanks!

@Olical
Copy link
Owner

Olical commented Sep 10, 2024 via email

@russtoku
Copy link
Contributor

Thanks for the link to the swank request-response library. I’m willing to help if you want a collaborator.

@Olical Olical added enhancement New feature or request client-commonlisp labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-commonlisp enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants