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

Provide support for Region tag #129

Closed
nfields03 opened this issue Mar 29, 2016 · 14 comments
Closed

Provide support for Region tag #129

nfields03 opened this issue Mar 29, 2016 · 14 comments

Comments

@nfields03
Copy link

Apologies if this is already in here somewhere, I looked through the open and closed issues and didn't see it. When I view a PowerShell script or module in VS Code, I can see that the #region and #endregion tags show up in green like proper comments, but don't provide a way to collapse the relevant lines like the PowerShell ISE provides. It was suggested in the PowerShell FB group to get this on the list for the PowerShell extension to VS Code, and I'll let the folks there know about it in case further discussion is needed.

@daviwil
Copy link
Contributor

daviwil commented Mar 29, 2016

Hey @nfields03, this is currently an issue with how VS Code implements folding support. They're aware of the issue and @rkeithhill has called out the PowerShell case specifically here:

microsoft/vscode#3422 (comment)

It seems the latest VS Code Insiders release has not fixed this issue yet so hopefully they'll get to it in the next month or two. I'll close this issue for now since there's nothing we can do for it (yet) in our extension.

@daviwil daviwil closed this as completed Mar 29, 2016
@nfields03
Copy link
Author

Thanks for the clarification David, cheers!

@dotps1
Copy link

dotps1 commented Jul 21, 2016

as the current insiders build on 20160721, this is still not working, and it seems both issues are closed.

@nfields03
Copy link
Author

I believe we're still waiting on the main VS Code application to support language aware folding; once that gets into the main program I suspect PowerShell folding/regions will happen in short order...

@johlju
Copy link

johlju commented Jul 21, 2016

#Region tag works only if the tag is written within the first 4 spaces.

@dotps1
Copy link

dotps1 commented Jul 21, 2016

it right at the start, no spaces:
untitled

notice no plus/minus at he region tag at the top.

and a side note, that at string of an sql query probably shouldn't be folding just because there are tabs.

@johlju
Copy link

johlju commented Jul 21, 2016

Ok, so it seems #region must be within a function as well.
2016-07-21 2

@dotps1
Copy link

dotps1 commented Jul 21, 2016

I'm glad you figured that out, but that seems like its incorrect right? I mean, I'm more likely to use this function in scripts rather then inside functions.

@johlju
Copy link

johlju commented Jul 21, 2016

Yes, I think it need to (and should) work anywhere you put it, as long as it's the only thing on that row.
I pointed out this before as well, in another issue, which also is closed, In that issue @daviwil said we need to wait for VS.Code to get the functionality. In this issue he says they are working on it. They probably has more pressing matters, and hasn't gotten that far yet. :)

@daviwil
Copy link
Contributor

daviwil commented Jul 21, 2016

I wonder if they're using the syntax highlighter scopes to determine where to fold... The latest VS Code update contains a refactored PowerShell syntax highlighting file so maybe that accounts for the change in behavior? I'll have to look into it again when I get more time.

@megamorf
Copy link

megamorf commented Jan 4, 2017

Any news on this?

@daviwil
Copy link
Contributor

daviwil commented Jan 4, 2017

Not at the moment, we are still waiting for support for syntax aware folding to be added in VS Code.

@APraestegaard
Copy link

That'll be great!

@jrremillard
Copy link

Hi All

Is there any update on this request?

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

No branches or pull requests

7 participants