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

How to use trace? #13

Open
shartf opened this issue Jun 13, 2024 · 0 comments
Open

How to use trace? #13

shartf opened this issue Jun 13, 2024 · 0 comments

Comments

@shartf
Copy link

shartf commented Jun 13, 2024

Hello,
I am trying to trace a function but cannot get trace results.
Here is my config part:

  "monkoose/nvlime",
  ft = { "lisp" },

  dependencies = {
    "monkoose/parsley",
  },
  init = function()
    vim.g.nvlime_config = {
      leader = "<leader>i",
      implementation = "sbcl",
      contribs = {
        "SWANK-ASDF",
        "SWANK-PACKAGE-FU",
        "SWANK-PRESENTATIONS",
        "SWANK-FANCY-INSPECTOR",
        "SWANK-C-P-C",
        "SWANK-ARGLISTS",
        "SWANK-REPL",
        "SWANK-FUZZY",
        "SWANK-TRACE-DIALOG",
      },
      user_contrib_initializers = nil,
      autodoc = {
        enabled = false,
        max_level = 5,
        max_lines = 50,
      },
      main_window = {
        position = "right",
        size = "",
      },
      floating_window = {
        border = "single",
        scroll_step = 3,
      },
      cmp = { enabled = true },
      arglist = { enabled = true },
    }
  end,

I can load the file, let us say

(defun fibonacci (n &optional (a 0) (b 1) (acc ()))
  (if (zerop n)
      (nreverse acc)
      (fibonacci (1- n) b (+ a b) (cons a acc)))) <--- SET TRACE HERE WITH <leader>tt

(fibonacci 5) <--- eval with <leader>ii/ie

But I never see the trace dialog, actually. Though I get the results of evaluation just fine.
If I set (trace fibonacci) in code I get the actual trace:

  0: (FIBONACCI 5)
    1: (FIBONACCI 4 1 1 (0))
      2: (FIBONACCI 3 1 2 (1 0))
        3: (FIBONACCI 2 2 3 (1 1 0))
          4: (FIBONACCI 1 3 5 (2 1 1 0))
            5: (FIBONACCI 0 5 8 (3 2 1 1 0))
            5: FIBONACCI returned (0 1 1 2 3)
          4: FIBONACCI returned (0 1 1 2 3)
        3: FIBONACCI returned (0 1 1 2 3)
      2: FIBONACCI returned (0 1 1 2 3)
    1: FIBONACCI returned (0 1 1 2 3)
  0: FIBONACCI returned (0 1 1 2 3)
@shartf shartf changed the title Config question: How to load SWANK modules? Config question: How to use trace? Jun 18, 2024
@shartf shartf changed the title Config question: How to use trace? How to use trace? Jun 18, 2024
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

No branches or pull requests

1 participant