Fork me on GitHub

Having troubles setting up the nrepl middleware in my portal-shadow example project.


Thomas Heller helped me fix this


Can I open the file for some data that has file metadata? Like I have for evaluation results when using the nrepl middleware.


Yeah, the goto-definition command should work on nrepl eval results


It does! Thanks!


Is it possible to make VS Code's keybinding work? I somehow thing it is, but it was a while since I did any webview work.


Currently this isn't supported, but it would be nice to leverage vscode key bindings in portal, just not sure how to do so or what it would look like.


Do we have access to the window or document of the WebView? Seems likely that standard browser semantics would come into play here.

window.addEventListener('keydown', event => {
  // handle event


This looks promising for the case you want a keybinding to reach the WebView that would otherwise be captured by Code first.


I think the issue here is more around allowing configuration of portal shortcuts via vscode


That is what I was referring to though. Offering a possible direction of thought regarding "not sure how to do so or what it would look like." Portal is running in a WebView, right? Does VS Code offer a direct connection between VS Code shortcuts and behaviors in a WebView? I have no idea. If so, great! Work on that. But I suspect that a WebView is mostly its own little island. If so, it would likely require the same process of listening for and responding to a KeyboardEvent that you would use in a browser.


I think that this might be quite tricky. But maybe Portal can register a definition provider, for the goto-definition case.