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

OUTLINE: No symbols found in document #3824

Closed
chuxinyuan opened this issue Jul 2, 2024 · 11 comments
Closed

OUTLINE: No symbols found in document #3824

chuxinyuan opened this issue Jul 2, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@chuxinyuan
Copy link

chuxinyuan commented Jul 2, 2024

Positron Version:

Positron Version: 2024.06.1 build 27
Code - OSS Version: 1.90.0
Commit: a893e5b
Date: 2024-06-26T01:22:29.024Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.6.34-1-MANJARO

Steps to reproduce the issue:

  1. Install the quarto extension
  2. Create a .qmd document and enter the following information:
# intro {#intro}

## Second level title

### third level title

截图 2024-07-03 07-50-24

@chuxinyuan chuxinyuan added the bug Something isn't working label Jul 2, 2024
@GitHunter0
Copy link

In .py files, the outline pane is empty too.

Also, sections in .R files like below are not appearing in the outline:

# Section 1 -------
## Subsection 1.1 -------
Windows 10 pro
Positron 2024-06.1-27

@isabelizimm
Copy link
Contributor

Hmmm... I am able to see outlines in .py files and .qmd files. Are you able to check in Settings (cmd/ctrl + ,) -> Outline to make sure the outline capabilities you'd prefer are turned on?

For Python files, the outline will populate when you create variables/classes, not necessarily at headings. I don't believe those sections are shown in .py files, but they are shown in .ipynb files. One alternative would be to use MARK comments in .py files to have sections show on a minimap, shown on the right hand side in the screenshot.

Screenshot 2024-07-03 at 1 34 58 PM

Do note that the Outline tab will only populate once you have started an interpreter, so if you do not have a Python/R runtime active, it will be empty.

@juliasilge
Copy link
Contributor

Also, sections in .R files like below are not appearing in the outline:

This is tracked in #3822 if you have more context to add there @GitHunter0.

For Quarto, we do have the outline as expected:

outline

@chuxinyuan are you sure that is a Quarto file? It should have a little Quarto icon like this with the filename if Positron knows it is Quarto:

Screenshot 2024-07-03 at 11 56 22 AM

@chuxinyuan
Copy link
Author

chuxinyuan commented Jul 3, 2024

@juliasilge Oh, better this time.

test

In addition, my practical experience under Windows tells me that even if you do not save the new .qmd document, Without file name suffixes, outline will still work. But there is no doubt that what you are doing is correct, and we should try our best to exclude the influence of other factors. I appreciate you taking it seriously.

@chuxinyuan
Copy link
Author

Hmmm... I am able to see outlines in .py files and .qmd files. Are you able to check in Settings (cmd/ctrl + ,) -> Outline to make sure the outline capabilities you'd prefer are turned on?

Yes, outline capabilities is turned on by default.

@juliasilge
Copy link
Contributor

I see that the outline works in untitled, unsaved Quarto files as well FYI:

untitled-quarto

@chuxinyuan do you happen to be a VS Code user as well? If so, would you open up this workspace in VS Code with the Quarto extension installed and see if you see the outline there? This could help us discover if this is a Positron-specific problem or a problem with the Quarto VS Code extension.

If you don't already use VS Code, we'll see if we can come up with a different way to debug.

@chuxinyuan
Copy link
Author

chuxinyuan commented Jul 4, 2024

@juliasilge Because when I installed Code OSS, the system told me that Code OSS and Positron conflicted, I had to uninstall Positron and reinstall it. After Code OSS is installed, the outline will not work properly.

test2

By the way, the OUTLINE of the .md file in Positron and Code OSS is normal.

Code OSS version info:

版本: 1.90.0
提交: 89de5a8
日期: 2024-06-07T07:53:34.265Z
Electron: 29.4.3
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Linux x64 6.6.34-1-MANJARO

@GitHunter0
Copy link

GitHunter0 commented Jul 4, 2024

Thank you, @juliasilge and @isabelizimm .

Now I got it, @isabelizimm , but in .py files I was hoping to get in the Outline pane a TOC like Spyder IDE provides, which is highly helpful. It implements a hierarchical section system as below:

#%% Section
#%%% Subsection
#%%%% Subsubsection

PS: There is a related VScode discussion here microsoft/vscode-python#17218

@chuxinyuan
Copy link
Author

chuxinyuan commented Jul 5, 2024

@juliasilge @isabelizimm I just tried it again in Visual Studio Code and the problem still persists. I think it's a genetic disease from upstream.

test

@seeM
Copy link
Contributor

seeM commented Jul 5, 2024

@GitHunter0 I've created a new issue to track this enhancement request: #3886 😄

@juliasilge
Copy link
Contributor

We've got issues open for outline improvements for R (#3822) and code cells (#3886).

For the problem in Quarto that we can't quite produce, I would suggest opening an issue on the repo for the Quarto VS Code extension. I hope we can get that fixed!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants