-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS Code Shell Integration support #1827
Comments
vscode integration doesn't work with powerlevel10k. It does make your shell slower though. You can find a bit of context here: microsoft/vscode#145610 (comment) If you search for "romkatv" in issues, you'll find a bit more. |
thanks @romkatv that makes sense, no big deal then, I'll just turn it off. Like you said it does make the shell a bit slower anyway :) |
@romkatv VS Code 1.68 closed one issue about ZSH: Is there any chance VS Code Shell Integration can be enabled back in Powerlevel10k now? I haven't dived deep, though. |
Microsoft would need to document the extensions they implement in VS Code terminal. Once they do this, I and other developers of software running in the terminal will be able to write code that integrates with VS Code terminal. Currently the extensions are undocumented, so only Microsoft can use them and thus only Microsoft can implement integration between VS Code terminal and powerlevel10k. |
Understood. I know that you have sent several advices for them, but do you know if there is any GitHub issue that specifically mentions and tracks this required work at their side? If there aren't any, I believe it would be the first step then. |
I don't know. I stopped following what they are doing when I learned which path they are taking and failing to dissuade them. |
Got it. Thank you. |
Out of curiosity, I agree with everything you said. I agree their approach isn't good, or even "legal"/ethical. Still, as an end-user, I would rather bite the bullet and "allow" their bad approach (given the benefits). |
Are you implying that I'm intentionally doing something that prevents Microsoft's integration code from working? This is not the case. If they or anyone else sends a PR to powerlevel10k that enables integration with VS Code terminal, I'll accept it provided that it doesn't break anything else and doesn't increase maintenance costs too much. I am also offering to make code changes myself if Microsoft publishes documentation describing said changes. Please note that other terminals that implement comparable features do publish documentation for them, and powerlevel10k integrates with them out of the box. |
No no, of course not. Your move of explicitly disabling the integration given the fact that it didn't work anyway and yet caused the prompt to be slower was great. There is an issue in VS Code side talking about it, by the way. I hope it gets some traction in future:
That's great, but I believe they would not do such a thing unless we make them understand the need for it. And I suppose there isn't a better person than you to write about it. Yet, I'm not asking you to do anything. I understand the negative experience you had with them on this matter so far. |
FWIW the experience was very positive on our end, @romkatv taught us a lot and brought up some important problems. It was just too early to resolve some of the problems and it felt like we were moving towards having a completely separate VS Code implementation in powerlevel10k which I don't think either of us want. |
This is the path I was alluding to. Terminals usually publish specifications of protocols while VS Code team in this instance prefers to publish shell code instead and to avoid documenting or making backward compatibility promises for VS Code terminal extensions. This means that only VS Code team is capable and responsible for integrating with all applications running under the terminal. I know zsh well enough to see that this cannot be done in practice. One cannot write zsh shell integration that will work with all zsh prompts. |
@romkatv have been experimenting with supporting the more standard protocol in microsoft/vscode#146587 (comment). Seems to work pretty well by just plugging it in to what exists, looks like we might have a downgraded experience when extracting the command though which I think we were talking about in another issue.
Again this is an experimental feature, documenting it would be shooting ourselves in the foot and take away our ability to change it. |
I think we are on the same page. |
I'm not clear about the current status. Did VSCode make changes so that it works with powerlevel10k? |
@huyz here's the update on our end microsoft/vscode#155639 |
I have been using the limited support since it was released, following these instructions: |
@felipecrs Great, that's exactly the counter-intuitive instructions I needed to know |
Has there been any movement on this? |
You'll need to be more specific. Open a new issue and provide enough details in your question to allow me to answer it. |
Hello, and thank you for this fantastic theme ❤️
Visual Studio Code recently introduced shell integration
terminal.integrated.shellIntegration
which perfectly supports bash, pwsh and zsh.Notice the blue circle before the command line
Unfortunately, it seems to work with any zsh theme except for p10k, and I suspect the reason is similar to this although I'm no expert: #1591
What I think VS Code does, is it reads .zshrc and then creates this file on which the shell will now rely on:
/tmp/vscode-zsh/.zshrc
Because I'm dumb and not sure how to fix it, the only thing I could try was to add
typeset -g VSCODE_SHELL_INTEGRATION=1
to.p10k.zsh
but that didn't change anything 😁Any ideas please?
Thank you very much for your time!
The text was updated successfully, but these errors were encountered: