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

fix: workspace summary ignore closed files and title field of metadata tag #1139

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

aswa2ds
Copy link
Contributor

@aswa2ds aswa2ds commented Nov 3, 2023

While using Neorg generate-workspace-summary. I met some problems similar with issue #1108 , and I solved them in this PR

  1. Uncategorized: Files not opened cannot be categorized. Because get_document_metadata function use parser:children() function to get norg_meta parser. But closed file's parser contains no children. So I directly use norg_meta parser to parse the metadata, if norg parser found the metadata tag.
  2. title field ignored: while parsing metadata with bufnr, the first line, like @ducument.meta will confuse the treesitter. Then @document.meta \n title: <some title> while considered as a whole part. Then title be ignored.
  3. title like '02' be considered as number type: if title field is like '02', the title node's type will be number, then the value parsed would be "2".

@vhyrro
Copy link
Member

vhyrro commented Nov 3, 2023

Hah you beat me to it by literally just a few minutes as I also sat down to fix this issue 😅

Thanks a lot for the fix!

@vhyrro vhyrro merged commit d081937 into nvim-neorg:main Nov 3, 2023
1 check passed
@aswa2ds
Copy link
Contributor Author

aswa2ds commented Nov 3, 2023

Hah you beat me to it by literally just a few minutes as I also sat down to fix this issue 😅

Thanks a lot for the fix!

Oh, I'm sorry about making you a waste of time on this small problem. And I'm so proud of contributing this amazing project.

@vhyrro
Copy link
Member

vhyrro commented Nov 3, 2023

You're all good don't worry about it. Thanks again :D

benlubas pushed a commit to benlubas/neorg that referenced this pull request Jan 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants