conjure icon indicating copy to clipboard operation
conjure copied to clipboard

Allow Clojure stack trace to be loaded into quickfix list

Open walterl opened this issue 5 years ago • 0 comments

It would be really great if you could load a stack trace, from the log buffer or elsewhere, into Neovim's quickfix (or location) list, and jump to each source location in that stack trace.

Some lines in stack traces can be confusing, like some.cool.thing_test/fn (form-init14467264639129876925.clj:43), so maybe a simple, initial solution could be to:

  1. Split out the ns from the line (some.cool.thing-test)
  2. Find the file in which that ns is defined (src/some/cool/thing_test.clj). Can CIDER/nREPL give us that?
  3. Parse out just the line number from the file location in parens (43)
  4. Set the jump location for the line to the file name from 2, at the line number from 3 (src/some/cool/thing_test.clj:43)

I'm not well versed in vim internals, so I'm not sure how doable that is.

I'm focusing on Clojure here, since it's what prompted me to ask about this feature, but it should be possible to abstract a solution to other languages too.

walterl avatar Oct 09 '20 22:10 walterl