Open AucklandIO opened 3 months ago
Hey @AucklandIO .Could you elaborate on what you mean by allowing files to be linted when they are not currently open in a vault? I ask because currently you can lint a specific file that is not open via the context menu when you right click in the file explorer and the same is possible for linting a folder.
There is also the ability to lint the whole vault if you so choose.
I am so sorry, I didn't realize this was already a feature, as I was led to believe it wasn't. Is it possible to bind this to a command? I ask because I want to add it to a Quickadd macro that lints the specific file the macro interacts with in order to clean it up when the macro adds some formatting I can't excise from the command and I don't want to have to open it or manually lint it after every commitment (this is for automating my journaling/task creation/logging etc).
The key point is I want to be able to inject the name of the file (which has automated creation in certain circumstances (for instance, when a new month is detected, a new overall task/log file is created) and I would like to make sure I can template the file to lint based on that macro and some scripting.
I am so sorry, I didn't realize this was already a feature, as I was led to believe it wasn't. Is it possible to bind this to a command? I ask because I want to add it to a Quickadd macro that lints the specific file the macro interacts with in order to clean it up when the macro adds some formatting I can't excise from the command and I don't want to have to open it or manually lint it after every commitment (this is for automating my journaling/task creation/logging etc).
The key point is I want to be able to inject the name of the file (which has automated creation in certain circumstances (for instance, when a new month is detected, a new overall task/log file is created) and I would like to make sure I can template the file to lint based on that macro and some scripting.
I am not sure that it works for the use case in question. I am saying this because I may not fully grasp the problem you are trying to solve. If you are trying to have the Linter run on a specific file, that is feasible when it is the active file or you use the right click context menu. However it is not feasible at this time to specify which file to lint via a name/path or something of the sort.
Now it is feasible to add something like this, however I am not sure I would know how to implement this. I do know how to convert a file path into a TFile
which is needed for the Linter to be able to run on a file. However I am not sure how this works with Obsidian commands since I am not aware of how Obsidian commands take arbitrary parameters. Could you point to an example of an Obsidian command that currently operates this way? Or could you explain how the Linter would know which file to update when the Obsidian command is run?
Also, is the expectation that the operation would be synchronous? I ask because I am pretty sure the current way files are linted is asynchronous and there are plans to move linting to a web worker to make it faster which would mean that there is not an easy way to run things synchronously.
Thanks for humoring me as I try to flush out what exactly this would look like assuming this kind of functionality were to be added.
Description:
As an active user of the Obsidian Linter plugin, I find its functionality essential for maintaining consistency and cleanliness in my notes. However, I am encountering a significant limitation in the current implementation in my personal workflow: the Linter can only run on files that are currently open in the editor.
Feature Request:
I would like to request the addition of a feature that allows the Linter to run on files that are not currently open in Obsidian. This functionality would greatly enhance the usability of the plugin, particularly in workflows where batch processing or automated formatting is required.
Use Cases:
Proposed Implementation:
Conclusion:
This enhancement would align with the plugin’s goal of maintaining note consistency and would significantly improve the efficiency of the note-taking and management process within Obsidian. I believe this feature would be a valuable addition to the Linter plugin and would greatly benefit many users in the community.
Thank you for considering this feature request. I look forward to any feedback or discussion on its feasibility.
If you have any further questions about my particular use case, please feel free to reach out for details!