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

Add config to silent notifications and always create new notes in notes_subdir #146

Merged
merged 6 commits into from
Jun 27, 2023

Conversation

TwIStOy
Copy link
Contributor

@TwIStOy TwIStOy commented Jun 23, 2023

No description provided.

Copy link
Owner

@epwalsh epwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @TwIStOy, thanks for the PR. I have a couple comments:

  1. It's not clear to me based on the name of the option what setting never_current_dir does.
  2. There's a lot of places where we call echo.info(..). Instead of wrapping all of those cases in an if not opts.silent block, maybe we could add the logic within echo module itself?

@TwIStOy
Copy link
Contributor Author

TwIStOy commented Jun 24, 2023

Thanks for your review!

  1. Move the option from config to config. completion and rename it to new_notes_location. Maybe the name is more clear?
  2. In the echo module, it's hard to get the instance of obsidian.Client. So I try to pass the client as a parameter into echo.info, I think it's a little wired. If there's some better options, please let me know. I will update the pr.

@epwalsh
Copy link
Owner

epwalsh commented Jun 26, 2023

Thanks @TwIStOy, I liked how you handled new_notes_location. For the echo module, I think it would make a little more sense to have a log_level setting instead of the silent option. And we could just pass log_level to echo.(debug|info|warn|error) instead of the client itself. How does that sound?

@TwIStOy
Copy link
Contributor Author

TwIStOy commented Jun 27, 2023

Sounds good. Change silent option to log_level.

Copy link
Owner

@epwalsh epwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

lua/obsidian/config.lua Outdated Show resolved Hide resolved
@epwalsh epwalsh merged commit 3e9e127 into epwalsh:main Jun 27, 2023
5 checks passed
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