haskell-vim-now
haskell-vim-now copied to clipboard
Feature request: display TH splices
This is a pipe dream feature request but what the heck - it would be great to see TH splices for a given TH call in a quickview window!
That would be very cool. Do you know if there's a command line tool that will show the splices for a given file? If so we could investigate how to shell out to that program and store the results in a new buffer.
As of 2015 the encantation ghc --ddump-splices {file} will print the splices of {file} to stdout. Before that it printed to stderr (source: http://stackoverflow.com/questions/15851060/ghc-ddump-splices-option-template-haskell#15851260). I use stack, however, so in my terminal I chant stack exec ghc -- -ddump-splices {file} which works wonders :)
OK, I think this will do what we need. Just have to add a keybinding (,hs maybe) to run that command and then open the result in a new pane. I've created a reminder for myself to add this feature, but if you want to attempt a pull request that would be great as well.
I think that by the time I learned enough VimL you would most likely have it done! I'll give it a shot tonight if can, though. :)