chhoumann / quickadd

QuickAdd for Obsidian
https://quickadd.obsidian.guide
MIT License
1.44k stars 134 forks source link

Ability to specify folder in which script JS files are stored #649

Closed kiranjholla closed 4 months ago

kiranjholla commented 4 months ago

Is your feature request related to a problem? Please describe. As of now, the script JS files are not recognized unless they are in the root of the vault.

Describe the solution you'd like Would be nice to load all script files from a subfolder within the vault.

Additional context It would be useful to organize all macro scripts into a subfolder so that they don't clog the root directory.

chhoumann commented 4 months ago

Hey @kiranjholla, thank you for opening this issue. Which version of QuickAdd and Obsidian are you on?

The intended behavior is that .js files are recognized in any folder. I have mine in, I think something like bins/scripts, and that has worked for me.

Are they not being found in the modal where you can select a script for a macro? If so, could you provide me with a path to a script that doesn't get recognized?

Thanks!

kiranjholla commented 4 months ago

@chhoumann Hi, I am on v1.5.8 and just installed QuickAdd from the community pluggins. So assuming that was the latest version.

I had my JS files in vault/.obsidian/scripts/*.js, but they weren't found in the modal. They appeared in the modal only after I moved them to vault/*.js

chhoumann commented 4 months ago

Ah, I see. I would very much like to avoid supporting the .obsidian folder, as it contains important data for Obsidian and your vault. Not to mention, there are a bunch of other .js files for any other plugins you have.

Anywhere else should work. For example, you can do what I do, and keep a bins/scripts directory.