coc-powershell
coc-powershell copied to clipboard
feature: Restart terminal
Summary of the new feature
Wondering if we can port vscode's "Restart current session" to this extension. I did some research about a year ago, and the only way to do this was to kill terminal pid directly. But somehow it was messing up my colors (I had separate theme for terminal and files). Maybe this can be achieved via language server now
Another thing I was looking for is to get powershell console up even without opening ps files. More like an alternative for calling :term, I think it's psic is more robust. Probably this can be achieved by vim settings, but might be another option for ps extensions.
I like this idea. We may need to port over the entire session class: https://github.com/PowerShell/vscode-powershell/blob/55ebbafeb8939cbea7ff9a8ea175c79181b1187b/src/session.ts
but coc has been really nice to us so far so it might be straightforward.
In any case, here's restartSession:
https://github.com/PowerShell/vscode-powershell/blob/55ebbafeb8939cbea7ff9a8ea175c79181b1187b/src/session.ts#L243