Skip to content

Commit 194f9fc

Browse files
epwalshgithub-actions[bot]
authored andcommitted
chore(docs): auto generate docs
1 parent c8b7d91 commit 194f9fc

File tree

2 files changed

+37
-23
lines changed

2 files changed

+37
-23
lines changed

doc/obsidian.txt

+11-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ COMMANDS *obsidian-commands*
6767
cursor, optionally opening it in a vertical or horizontal split.
6868
- `:ObsidianBacklinks` for getting a location list of references to the current
6969
buffer.
70+
- `:ObsidianTags [TAG ...]` for getting a location list of all occurrences of the
71+
given tags.
7072
- `:ObsidianToday [OFFSET]` to open/create a new daily note. This command also
7173
takes an optional offset in days, e.g. use `:ObsidianToday -1` to go to
7274
yesterday’s note. Unlike `:ObsidianYesterday` and `:ObsidianTomorrow` this
@@ -404,7 +406,15 @@ carefully and customize it to your needs:
404406

405407
-- Optional, customize the backlinks interface.
406408
backlinks = {
407-
-- The default height of the backlinks pane.
409+
-- The default height of the backlinks location list.
410+
height = 10,
411+
-- Whether or not to wrap lines.
412+
wrap = true,
413+
},
414+
415+
-- Optional, customize the tags interface.
416+
tags = {
417+
-- The default height of the tags location list.
408418
height = 10,
409419
-- Whether or not to wrap lines.
410420
wrap = true,

doc/obsidian_api.txt

+26-22
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,6 @@ obsidian.SearchOpts
3939
Return ~
4040
obsidian.SearchOpts
4141

42-
------------------------------------------------------------------------------
43-
Class ~
44-
{obsidian.TagLocation}
45-
46-
Fields ~
47-
{tag} `(string)`
48-
{path} `(string|Path)`
49-
{line} `(integer)`
50-
5142
------------------------------------------------------------------------------
5243
*obsidian.Client*
5344
`Client`
@@ -187,7 +178,7 @@ An async version of `find_notes()` that runs the callback with an array of all m
187178
Parameters ~
188179
{term} `(string)` The term to search for
189180
{opts} `(obsidian.SearchOpts|boolean|?)` search options or a boolean indicating if sorting should be used
190-
{callback} `(function)` (obsidian.Note[]) -> nil
181+
{callback} `(fun(notes: obsidian.Note[]))`
191182

192183
------------------------------------------------------------------------------
193184
*obsidian.Client.find_files()*
@@ -210,7 +201,7 @@ An async version of `find_files`.
210201
Parameters ~
211202
{term} `(string)` The search term.
212203
{opts} `(obsidian.SearchOpts|boolean|?)` Search options or a boolean indicating if sorting should be done
213-
{callback} `(function)` (Path[]) -> nil
204+
{callback} `(fun(paths: Path[]))`
214205

215206
------------------------------------------------------------------------------
216207
*obsidian.Client.resolve_note()*
@@ -231,19 +222,32 @@ An async version of `resolve_note()`.
231222

232223
Parameters ~
233224
{query} `(string)`
234-
{callback} `(function(obsidian.Note|?))`
225+
{callback} `(fun(note: obsidian.Note|?))`
235226

236227
Return ~
237228
obsidian.Note| `(optional)`
238229

230+
------------------------------------------------------------------------------
231+
Class ~
232+
{obsidian.TagLocation}
233+
234+
Fields ~
235+
{tag} `(string)` The tag found.
236+
{note} obsidian.Note The note instance where the tag was found.
237+
{path} `(string|Path)` The path to the note where the tag was found.
238+
{line} `(integer)` The line number (1-indexed) where the tag was found.
239+
{text} `(string)` The text (with whitespace stripped) of the line where the tag was found.
240+
{tag_start} `(integer|?)` The index within 'text' where the tag starts.
241+
{tag_end} `(integer|?)` The index within 'text' where the tag ends.
242+
239243
------------------------------------------------------------------------------
240244
*obsidian.Client.find_tags()*
241245
`Client.find_tags`({self}, {term}, {opts}, {timeout})
242-
Find all tags starting with the given term.
246+
Find all tags starting with the given term(s).
243247

244248
Parameters ~
245-
{term} `(string)`
246-
{opts} `(obsidian.SearchOpts|table|boolean|?)` search options or a boolean indicating if sorting should be used
249+
{term} `(string|string[])`
250+
{opts} `(obsidian.SearchOpts|boolean|?)` search options or a boolean indicating if sorting should be used
247251
{timeout} `(integer|?)`
248252

249253
Return ~
@@ -255,18 +259,18 @@ obsidian.TagLocation[]
255259
An async version of 'find_tags()'.
256260

257261
Parameters ~
258-
{term} `(string)`
259-
{opts} `(obsidian.SearchOpts|table|boolean|?)` search options or a boolean indicating if sorting should be used
260-
{callback} `(function(obsidian.TagLocation[]))` -> nil
262+
{term} `(string|string[])`
263+
{opts} `(obsidian.SearchOpts|boolean|?)` search options or a boolean indicating if sorting should be used
264+
{callback} `(fun(tags: obsidian.TagLocation[]))`
261265

262266
------------------------------------------------------------------------------
263267
*obsidian.Client.apply_async()*
264268
`Client.apply_async`({self}, {on_note}, {on_done}, {timeout})
265269
Apply a function over all notes in the current vault.
266270

267271
Parameters ~
268-
{on_note} `(function)` (obsidian.Note,) -> nil
269-
{on_done} `(function)` () -> nil
272+
{on_note} `(fun(note: obsidian.Note))`
273+
{on_done} `(fun())`
270274
{timeout} `(integer|?)` Timeout in milliseconds.
271275

272276
------------------------------------------------------------------------------
@@ -275,8 +279,8 @@ Parameters ~
275279
Like apply, but the callback takes a path instead of a note instance.
276280

277281
Parameters ~
278-
{on_path} `(function)` (string,) -> nil
279-
{on_done} `(function)` () -> nil
282+
{on_path} `(fun(path: string))`
283+
{on_done} `(fun())`
280284
{timeout} `(integer|?)` Timeout in milliseconds.
281285

282286
------------------------------------------------------------------------------

0 commit comments

Comments
 (0)