nvlime
nvlime copied to clipboard
How to use trace?
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)