Open dvalde0 opened 3 months ago
Thanks for reporting this @dvalde0 I am not against adding support for this feature, if someone wants to take a stab at this I can provide support.
Hi there @riccardoferretti,
I've been a Foam user for over three years and love it. However, I'm primarily a junior JS developer and don't have much experience with VSCode extensions. If I wanted to get started contributing to Foam, I'd love to know more about how to build and test Foam. Any links to resources or documentation would be greatly appreciated.
Hi @TieWay59 - the best place to get started is reading the contribution-guide.md
file (here).
For this specific feature a starting point would be the extension.ts
file (here), which is basically the entry point for the extension, and handles the file exclusions.
Let me know if you have any question, thanks for wanting to help!
Hi @TieWay59 - the best place to get started is reading the
contribution-guide.md
file (here).For this specific feature a starting point would be the
extension.ts
file (here), which is basically the entry point for the extension, and handles the file exclusions.Let me know if you have any question, thanks for wanting to help!
I apologize for my slow progress during my spare time. I have tried the process outlined in contribution-guide.md and have managed to start a test host using the debugger. Here, I have a question: how can I determine whether the running instance of Foam is the one I've built locally? Is there any method for this?
I've tried running the command code --list-extensions --show-versions | rg foam-vscode
and got the following output:
foam.foam-vscode@0.26.1
However, this output doesn't seem to indicate anything. Perhaps I could temporarily modify the project's version number somewhere? @riccardoferretti
I am currently conducting some experiments on my own branch and feel that it is not yet ready to be merged. Before I propose a PR, I would like to share my thoughts:
Introduction of Gitignore Rules: I plan to incorporate the rules from .gitignore
into the global exclude rules during the program's startup phase. This change is located at the commit position mentioned. Through testing and logging, I have confirmed the effectiveness of this approach. https://github.com/TieWay59/foam/commit/74dc6c1267b2d2f4c9692f05009623b387051af4 @riccardoferretti
Questions for Discussion:
bad_note.md
, but I use a link like [[bad_note]]
in another file, what behavior should the excluded bad_note.md
exhibit? (My naive understanding is that it should prompt that the link cannot be established because it has been excluded.).gitignore
at the start of the program a one-time execution? What actions should I take to ensure dynamic updates, or to trigger updates with certain actions? For example, is it a good idea to update when the Update
command is issued?Hi @TieWay59 , sorry for the late response, here we go:
To your questions:
bad_note.md
is invisible to Foam, so [[bad_note]]
is treated as a placeholder. Clicking on the placeholder will create a note from it, which depending on the pattern would also be ignored, going back to square 1extension.ts
we do this for a few settings)The other thing that is worth mentioning is making sure that the semantics of the gitignore file are properly represented in the glob ignore pattern. TBH I am not sure 100% as I have never had to dig deep into it, so it might be a non-problem - but what I would want to avoid is that unexpected behavior there
Is your feature request related to a problem? Please describe.
The graph view plots all the files in the repository. This is a problem if the user has a virtual env installed in the repository, becuase it will plot all the .md files in the env. This also applies to wikilink autocompletion, where the pop-up will include all the files in the venv.
Describe the solution you'd like
Make foam respect the .gitignore file, meaning that the folders and files defined in .gitignore should be ignored by foam entirely.
Describe alternatives you've considered
The user could filter the filetypes in Foam > Files: Notes Extensions and use a custom filetype, but this is really not an alternative.
Screenshots or Videos
No response