Skip to content

Commit

Permalink
fix(type): makes client opts optional
Browse files Browse the repository at this point in the history
  • Loading branch information
aarnphm authored Aug 16, 2024
1 parent 14e0427 commit 2e2eab7
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions lua/obsidian/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ local util = require "obsidian.util"
local config = {}

---@class obsidian.config.ClientOpts
---@field dir string|?
---@field workspaces obsidian.workspace.WorkspaceSpec[]|?
---@field log_level integer
---@field notes_subdir string|?
---@field templates obsidian.config.TemplateOpts
---@field new_notes_location obsidian.config.NewNotesLocation
---@field note_id_func (fun(title: string|?): string)|?
---@field note_path_func (fun(spec: { id: string, dir: obsidian.Path, title: string|? }): string|obsidian.Path)|?
---@field wiki_link_func (fun(opts: {path: string, label: string, id: string|?}): string)
---@field markdown_link_func (fun(opts: {path: string, label: string, id: string|?}): string)
---@field preferred_link_style obsidian.config.LinkStyle
---@field follow_url_func fun(url: string)|?
---@field follow_img_func fun(img: string)|?
---@field note_frontmatter_func (fun(note: obsidian.Note): table)|?
---@field disable_frontmatter (fun(fname: string?): boolean)|boolean|?
---@field completion obsidian.config.CompletionOpts
---@field mappings obsidian.config.MappingOpts
---@field picker obsidian.config.PickerOpts
---@field daily_notes obsidian.config.DailyNotesOpts
---@field use_advanced_uri boolean|?
---@field open_app_foreground boolean|?
---@field sort_by obsidian.config.SortBy|?
---@field sort_reversed boolean|?
---@field search_max_lines integer
---@field open_notes_in obsidian.config.OpenStrategy
---@field ui obsidian.config.UIOpts | table<string, any>
---@field attachments obsidian.config.AttachmentsOpts
---@field callbacks obsidian.config.CallbackConfig
---@field dir? string|?
---@field workspaces? obsidian.workspace.WorkspaceSpec[]|?
---@field log_level? integer
---@field notes_subdir? string|?
---@field templates? obsidian.config.TemplateOpts
---@field new_notes_location? obsidian.config.NewNotesLocation
---@field note_id_func? (fun(title: string|?): string)|?
---@field note_path_func? (fun(spec: { id: string, dir: obsidian.Path, title: string|? }): string|obsidian.Path)|?
---@field wiki_link_func? (fun(opts: {path: string, label: string, id: string|?}): string)
---@field markdown_link_func? (fun(opts: {path: string, label: string, id: string|?}): string)
---@field preferred_link_style? obsidian.config.LinkStyle
---@field follow_url_func? fun(url: string)|?
---@field follow_img_func? fun(img: string)|?
---@field note_frontmatter_func? (fun(note: obsidian.Note): table)|?
---@field disable_frontmatter? (fun(fname: string?): boolean)|boolean|?
---@field completion? obsidian.config.CompletionOpts
---@field mappings? obsidian.config.MappingOpts
---@field picker? obsidian.config.PickerOpts
---@field daily_notes? obsidian.config.DailyNotesOpts
---@field use_advanced_uri? boolean|?
---@field open_app_foreground? boolean|?
---@field sort_by? obsidian.config.SortBy|?
---@field sort_reversed? boolean|?
---@field search_max_lines? integer
---@field open_notes_in? obsidian.config.OpenStrategy
---@field UI? obsidian.config.UIOpts | table<string, any>
---@field attachments? obsidian.config.AttachmentsOpts
---@field callbacks? obsidian.config.CallbackConfig
config.ClientOpts = {}

--- Get defaults.
Expand Down

0 comments on commit 2e2eab7

Please sign in to comment.