Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(type): makes client opts optional #681

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading