Skip to content
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

[Feature Request] Add separator lines in Dockerfile for multistage build #4386

Closed
Tracked by #4394 ...
ras0q opened this issue Sep 20, 2024 · 8 comments
Closed
Tracked by #4394 ...

Comments

@ras0q
Copy link

ras0q commented Sep 20, 2024

If the extension could provide hints for separating each stage into sections, it would improve readability without the need for users to explicitly include comments separating the stages.

Slidev offers a feature similar to this.
https://sli.dev/features/vscode-extension

before after
image image
@benwaffle
Copy link

benwaffle commented Feb 7, 2025

Yeah, this would be nice. IntelliJ IDEs do this:

Image

@rcjsuen
Copy link
Contributor

rcjsuen commented Feb 8, 2025

I'm not sure if the language server can do anything about this. @bwateratmsft Does VS Code have APIs to draw horizontal lines in the editor?

@bwateratmsft
Copy link
Collaborator

@rcjsuen We could maybe use CodeLens although that's not really the intended purpose. I think the closest thing would be folding ranges, but that's already covered in issue #230.

I'll resolve this as a duplicate of #230. @ras0q @benwaffle if you think #230 is too different from what you're looking for, can you file an issue on VSCode to support horizontal lines?

@benwaffle
Copy link

Can do. Are you only interested in doing this via LSP? As far as I know, VSCode extensions can do custom drawing on the editor.

@bwateratmsft
Copy link
Collaborator

Yeah, the LSP would be the right way to do this. Do you have any info on that custom drawing capability?

@benwaffle
Copy link

I know for certain you can do it in monaco, the editor library from vscode - https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.2#example-interacting-with-the-editor-listening-to-mouse-events

So I assumed you can do the same thing via an extension

@rcjsuen
Copy link
Contributor

rcjsuen commented Feb 12, 2025

So I assumed you can do the same thing via an extension

Thanks for that example, @benwaffle. Looks like you can draw random lines with Monaco's changeViewZones API. I'm not familiar with the decorations API in VS Code so not sure if we can replicate the same thing here or not (even if we think outside the "language server box").

@bwateratmsft
Copy link
Collaborator

VSCode's extension APIs don't give direct access to the Monaco framework. There are webviews where you can do whatever you want, but the text editor isn't a webview in the sense that it cannot be extension-controlled, except through the APIs that VSCode offers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants