patleeman / VSNotes

Simple VS Code extension for plain text note taking.
https://marketplace.visualstudio.com/items?itemName=patricklee.vsnotes
MIT License
174 stars 33 forks source link

Notes not displaying in left pane #69

Open xapfrom opened 5 years ago

xapfrom commented 5 years ago

Clicking on VSNotes sidebar icon does not display anything except for the continuously moving blue "bar" at the top of the left pane

alanquigley-toast commented 4 years ago

Same issue :(

alanquigley-toast commented 4 years ago

TypeError: Cannot use 'in' operator to search for 'tags' in tags - eslint - tech note at /Users/alanquigley/.vscode/extensions/patricklee.vsnotes-0.7.1/src/treeView.js:165:28

alanquigley-toast commented 4 years ago

Disabling the tags at will allow you to use your notes via the folder navigation.

alanquigley-toast commented 4 years ago

This was caused by a badly formatted tags section in one of my notes.

pierretoure commented 4 years ago

Fixed by using spaces indentation rather than tab

This seemed to be the issue, but now it work also by using tab indentation, please give your feedbacks

As pointed by @alanquigley-toast, in my case it seems to be caused by badly formatted tags section in few of my notes :

---
tags:
    - math <-- Here is the tab indentation (expected spaces)
---

Because using \t for tab indentation in my snippet :

{
    "vsnote_template_zettel": {
        "prefix": "vsnote_template_zettel",
        "body": [
            "---",
            "tags:",
            "\t- ${1:tag}", # <-- Here is tab indentation
            "---",
            "",
            "",
            "# ${TM_FILENAME}[^1]",
            "",
            "${0:content}",
            "",
            "",
            "",
            "[^1]: $CURRENT_DATE.$CURRENT_MONTH.$CURRENT_YEAR, $CURRENT_HOUR:$CURRENT_MINUTE"
        ],
        "description": "Standard Template",
    },
}

Fixed by replacing \t by two spaces :

{
    "vsnote_template_zettel": {
        "prefix": "vsnote_template_zettel",
        "body": [
            "---",
            "tags:",
            "  - ${1:tag}", # <-- Replaced by two spaces
            "---",
            "",
            "",
            "# ${TM_FILENAME}[^1]",
            "",
            "${0:content}",
            "",
            "",
            "",
            "[^1]: $CURRENT_DATE.$CURRENT_MONTH.$CURRENT_YEAR, $CURRENT_HOUR:$CURRENT_MINUTE"
        ],
        "description": "Standard Template",
    },
}
hzuika commented 4 years ago

I have the same issue. Loading does not end. This occurred for folders with many subfolders and files.

When tried on a new small folder, this worked. However, no tags were listed. I tried tab, two spaces and four spaces.

jangroth commented 4 years ago

I think the underlying issue is that if anything goes wrong when parsing tags, the view will stay empty and leave the user in the dark.

For me, the issue was a missing : after tags on one note, but it took a lot of guesswork to figure it out.

Would love to see an error message pointing out the problem or at least the log file location...

pchampin commented 4 years ago

For me the problem was a missing space after title:

---
title:I forgot the space after the colon
date: 2020-09-14 15:30
tags: [foo]
---

Now that I know it, I'll check the console whenever the VSNotes pane is empty, but it really should be robust to that kind of things...

dullnzr commented 3 years ago

Can confirm that tag format can cause this issue. I found a note with 3 spaces before a tag instead of two. Once corrected it loaded fine.