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] Adopt New Vscode Outline #680

Closed
Astrantia opened this issue Jun 28, 2018 · 18 comments
Closed

[Feature Request] Adopt New Vscode Outline #680

Astrantia opened this issue Jun 28, 2018 · 18 comments
Labels
enhancement Issue suggests an enhancement

Comments

@Astrantia
Copy link
Contributor

Description

I think VScode's native Outline view is quite extensible now, so instead of cluttering the sidebar with both vscode's Outline and Latex Workshop's Latex Outline, I believe it would be better do discard Latex Outline and mimic its behavior in Outline. Other extension developers (Markdown, etc...) have already started doing this.
Attached is a picture for reference: image

@Astrantia Astrantia changed the title Adopt New Vscode Outline [Featuer Request] [Feature Request] Adopt New Vscode Outline Jun 28, 2018
@James-Yu
Copy link
Owner

It's a good enhancement of vscode and the extension. However, the API is still subject to changes according to microsoft/vscode#34968, and I need to evaluate it when ready.

@James-Yu James-Yu added the enhancement Issue suggests an enhancement label Jun 28, 2018
@jose-a-sa
Copy link

It would be great if you could include \label{}, sections, subsections, etc. together in the same outline view.

@jose-a-sa
Copy link

A good alternative would be to add a new badge (look into GitLens extensions).

screenshot from 2018-07-17 12-20-55

@Gliptal
Copy link

Gliptal commented Jul 19, 2018

+1 for the badge, the explorer is already full as it is for large projects.

@werunom
Copy link

werunom commented Aug 17, 2018

I would also vote for using the new outline. Because, when I have opened markdown file and a tex file simultaneously, there are two outlines in the explorer sidebar - one is the default new outline and the other is the latex outline. With this, when I swap between a markdown file and a tex file, I have to keep shuffling between two outlines. And in the case of markdown files, there is a redundancy. Attaching a gif for reference...

@Astrantia
Copy link
Contributor Author

Astrantia commented Sep 7, 2018

@James-Yu tried the new commit and it's quite broken. With the following document hierarchy :
ROOT TEX (parent)

\input{FirstDOC.tex}
\input{SecondDOC.tex}
\input{ThirdDOC.tex}
\input{FourthDOC.tex}
\input{FifthDOC.tex}
\input{SixthDOC.tex}

Write 1 section in all of the inputs, then
Write 2-3 subsections in FifthDOC.tex and SixthDOC.tex. Notice the incorrect Outline view.

@James-Yu
Copy link
Owner

James-Yu commented Sep 7, 2018

Will check now.

@James-Yu James-Yu reopened this Sep 7, 2018
@James-Yu
Copy link
Owner

James-Yu commented Sep 7, 2018

To be honest, this is an upstream problem with vscode. Currently the outline view does not respect multi-file outline symbols. Seems no workaround is available now.

@James-Yu
Copy link
Owner

James-Yu commented Sep 7, 2018

You may notice that by default, the outline is sorted by position, which simply breaks on multi-file projects. This is also the reason why the structure is incorrect.

@Astrantia
Copy link
Contributor Author

Astrantia commented Sep 7, 2018

@James-Yu Thanks for looking into this. Maybe instead of the outline view, we can use a Badge webview as suggested by other users?
image

GitLens manages to do a lot of things so I think there's more support

@James-Yu
Copy link
Owner

James-Yu commented Sep 7, 2018

That might be the only solution currently. However this involves some refactoring. I'll try finish it in the next few days.

@Astrantia
Copy link
Contributor Author

@James-Yu Great work on the badge in the new release! So far it's been fine, but I have one small feature request if it's possible. Can we add the output pdf in the view of that badge below the structure? Clicking it should open it in pdf viewer or in chrome as set in user preferences.

@Astrantia
Copy link
Contributor Author

Astrantia commented Sep 9, 2018

Also another suggestion. Currently, when you open vscode in a directory like this:

- LatexProject1
–– TexFile1
–– ...
- LatexProject2
–– TexFile2
–– ...

There is nothing shown in the view. It would be nice to see the structure of projects under

LatexProject1
.
..
...
LatexProject2
.
..
...

@James-Yu
Copy link
Owner

It is not possible to add a custom HTML view to the sidebar as far as I'm concerned. Though a list of commands is possible.

As to the second one, there is no plan to support multiple projects in sub-folders. This is related to the workflow of vscode/the extension. Typically one opens each project in an individual workspace. Suppose there is a LaTeX project in a folder which is in the root of another javascript project, which has its node_modules. The extension will be struggling to identify the 1000 modules inside.

@James-Yu
Copy link
Owner

Closing this issue for now. Comments and suggestions are welcomed.

@Astrantia
Copy link
Contributor Author

Astrantia commented Sep 10, 2018

@James-Yu Maybe we could add something like Utils tab in the badge view that will list some common commands:

Format Document
Forward Synctex
Open PDF in Vscode
Open PDF in Chrome
...

@James-Yu
Copy link
Owner

Yes that can be a useful feature. I am thinking of a good way to have them presented.

@Astrantia
Copy link
Contributor Author

Astrantia commented Sep 10, 2018

image
Gitlens has 2 tabs in its view. In our case one can be called Structure and the other can be called ...
It's also possible to add icons to the commands, so that will be nice.
image

This is an example of TODO+ extension view.

Repository owner locked as resolved and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Issue suggests an enhancement
Projects
None yet
Development

No branches or pull requests

5 participants