-
Notifications
You must be signed in to change notification settings - Fork 2
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
Collapsible passages #7
Comments
I didn't realize indentation was such a convenient way to fold anything in VSCode! Good to know. But yeah, what I was thinking was that they shouldn't be required, i.e.
|
I was just giving something like that a try, but you're right, I'm not sure how to tell it that the start of the next region is the end of the current one. The closest I've got to something working is: {
"markers": {
"start": "^::.*$",
"end": ""
} This will only fold the first line in the passage. Also interesting, I couldn't get |
Maybe this hacky way would work:
|
Ah I see where you're going with that. Didn't seem to work though. (btw if you clone this repo, open with VS code and go to I think what VSCode is doing is labeling each line as either a start marker or end marker. And if a line is both, it ignores it(?) |
Another potential solution to this would be to make passage labels trigger
an automatic indent on the following lines. Not everyone would want this,
so it could be a togglable setting for the extension.
…On Thu, Aug 6, 2020, 9:35 PM Dustin Woods ***@***.***> wrote:
Ah I see where you're going with that. Didn't seem to work though. (btw if
you clone this repo, open with VS code and go to run->start debugging you
can give these a try)
I think what VSCode is doing is labeling each line as either a start
marker or end marker. And if a line is both, it ignores it(?)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATXBKMQ76QRHCBKFZIPWPDR7NZBJANCNFSM4PXFSOBA>
.
|
Clever idea! Yeah definitely something that would be optional. Another approach would be to implement a language server. This allows an extension to analyze an entire document, and return various interpretations about it, folding regions being one of them. Might be worth the effort. |
The tab thing is not a perfect workaround. I just found out that `[coffee
script]` blocks will cause a compilation error if the whole block is
indented.
…On Mon, Aug 10, 2020 at 9:20 AM Dustin Woods ***@***.***> wrote:
Clever idea! Yeah definitely something that would be optional.
Another approach would be to implement a language server. This allows an
extension to analyze an entire document, and return various interpretations
about it, folding regions being one of them. Might be worth the effort.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATXBKJ4YYAYVMSBYWKY3VDSAAF4BANCNFSM4PXFSOBA>
.
|
Ah good catch!
On Tue, Aug 11, 2020, 10:31 Nat Quayle Nelson <notifications@github.com>
wrote:
… The tab thing is not a perfect workaround. I just found out that `[coffee
script]` blocks will cause a compilation error if the whole block is
indented.
On Mon, Aug 10, 2020 at 9:20 AM Dustin Woods ***@***.***>
wrote:
> Clever idea! Yeah definitely something that would be optional.
>
> Another approach would be to implement a language server. This allows an
> extension to analyze an entire document, and return various
interpretations
> about it, folding regions being one of them. Might be worth the effort.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <
#7 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AATXBKJ4YYAYVMSBYWKY3VDSAAF4BANCNFSM4PXFSOBA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKI7EGE35LQLX3RVAOMOM3SAF57HANCNFSM4PXFSOBA>
.
|
Someone just started another twee extension, and they've made a ton more progress than I have here. They still don't have collapsible passages, but it may be easier to implement with what they have started. I opened this same issue over there: cyrusfirheir/twee3-language-tools#2 |
Thanks for making this!
One thing that would be nice is if I could collapse/expand each passage in a file.
The text was updated successfully, but these errors were encountered: