coddingtonbear / obsidian-local-rest-api

Unlock your automation needs by interacting with your notes in Obsidian over a secure REST API.
MIT License
607 stars 56 forks source link

Expose Editor.scrollTo #74

Closed oflisback closed 1 year ago

oflisback commented 1 year ago

Hi @coddingtonbear, thanks a lot for creating this useful project!

I'm wondering if you'd be willing to add functionality to scroll the active note via (I guess) [Editor.scrollTo()](https://docs.obsidian.md/Reference/TypeScript+API/Editor/scrollTo#Editor.scrollTo()+method).

I'd be happy to make a PR for it if you give me some pointers on how you'd recommend it to be done and what endpoints you'd want to expose for it.

My reason for wanting scrollTo is to enable https://github.com/oflisback/obsidian-sync.nvim to in addition to what it does currently, sync the acive note, also sync active scroll position between neovim and the obsidian app.