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

wip: feat: Make foam respect the .gitignore file #1413

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TieWay59
Copy link

impl #1388

@TieWay59
Copy link
Author

TieWay59 commented Nov 20, 2024

I have already fixed some issues with Uri.file and should replace it with something like Uri.joinPath for usage. I am not sure if this is a standard practice. @riccardoferretti

The current effect is that all ignored information is read upon program initialization:

image

However, if the ignore is updated, it will not refresh due to saving the file.

image

TODO:

  1. Ensure that the semantics of the .gitignore file are correctly represented in glob ignore patterns.
  2. Design logic so that updates to the ignore file are dynamically read when the command foam: update wikilink def is executed. I want to consult with @riccardoferretti on whether this is reasonable. What code locations should I refer to?

UPD: The .gitignore file is actually an extension of glob patterns, adding more path rules, comments, and negation features. I can easily parse comments, and negation features, and path rules might differ less from glob patterns.

@riccardoferretti
Copy link
Collaborator

Regarding point n.2 you can refer to how we handle changing the related configuration, e.g. foam.files.ignore - see extension.ts:93. Basically, i consider acceptable to ask the user to reload the window to apply the updates

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