if I have understood correctly, the plugin API is not yet in a stable state, and I understand that you are still improving it. You probably have plans about improving the documentation too.
Some methods/properties do have comments, though. In my IDE (WebStorm), I use Quick Documentation along with auto complete very often to bring up documentation comments about methods and properties whose behaviour I’m trying to figure out. When the docs are empty, it makes it quite slow for me to learn the plugin development.
I have done programming on other projects and languages for a long time and I do know that writing comments is something that you don’t always have time for, and documentation can never be perfect. The API is large and I’m not expecting it to be documented at one time over a night. So, I do not mean this post to be a complaint .
I will continue my research on this API.
P.S. Sorry if this has already been discussed about. I was not lucky with a quick search.
The API could also mention Obsidian version numbers for each entity (=method/interface/property/etc), so that plugin developers know that “If I’m gonna use this feature, a user needs to have Obsidian version x.y.z or above for it to work”.
It’s mindblowing to see so many plugins, yet no documentation on the API.
I tried to write a plugin to save the editor scroll state. It just didn’t seem to work.
Then I realized that there are different interfaces for readign the scroll data and setting the scroll data. One using pixels, the other lines.
I think there are so many plugin developers out there that there could be many who could voluntarily help with documenting the API. I’d like to participate myself.
If I see some API method I could write documentation for, is there a way for me to contribute? Perhaps a pull request to GitHub - obsidianmd/obsidian-api: Type definitions for the latest Obsidian API. could be one way to communicate my documentation suggestions, but AFAIK obsidian.d.ts is not a source file, i.e. editing that file via pull requests would not offer Obsidian devs an easily automated way to pull the edits to their Obsidian source code? The edits would get overwritten when obsidian.d.ts gets rebuilt? Correct me if I’m wrong about this.
So, what would be the best place / best way to contribute API documentation so that its easy to integrate to obsidian.d.ts?
If you want to add, remove, or expand on current content, please submit an issue before you start working on it. We will let you know if this is something that should be worked on, or not.