-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refact: minor config optimization + doc and style improv
* docs: started typing _setup, Setup, and cfg # Conflicts: # lua/telekasten.lua * docs: typing config.lua * ci: add lua langauge server config file * refactor: remove unnecessary indirection from config.lua. add docs * refactor: add class for config module * docs: make VaultConfig docs more correct --------- Co-authored-by: ujisati <>
- Loading branch information
Showing
4 changed files
with
119 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", | ||
"workspace.library": ["lua"], | ||
"runtime.version": "Lua 5.4", | ||
"hint.enable": false | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--luacheck: ignore 211 | ||
---@meta | ||
|
||
---@alias MediaExtensions | ||
---| '".png"' | ||
---| '".jpg"' | ||
---| '".bmp"' | ||
---| '".gif"' | ||
---| '".pdf"' | ||
---| '".mp4"' | ||
---| '".webm"' | ||
---| '".webp"' | ||
|
||
---@class VaultConfig | ||
---@field home string | ||
---@field take_over_my_home boolean | ||
---@field auto_set_filetype boolean | ||
---@field auto_set_syntax boolean | ||
---@field dailies string | ||
---@field weeklies string | ||
---@field templates string | ||
---@field image_subdir string|nil Should be deprecated gracefully and replaced by "images" | ||
---@field extension "md" | string | ||
---@field new_note_filename "title" | "uuid" | "uuid-title" | ||
---@field uuid_type "%Y%m%d%H%M" | string | ||
---@field uuid_sep "-" | string | ||
---@field filename_space_subst string|nil | ||
---@field follow_creates_nonexisting boolean | ||
---@field dailies_create_nonexisting boolean | ||
---@field weeklies_create_nonexisting boolean | ||
---@field journal_auto_open boolean | ||
---@field image_link_style "wiki" | "markdown" | ||
---@field sort "filename" | "modified" | ||
---@field subdirs_in_links boolean | ||
---@field plug_into_calendar boolean | ||
---@field calendar_opts CalendarOpts | ||
---@field close_after_yanking boolean | ||
---@field insert_after_inserting boolean | ||
---@field tag_notation "#tag" | "@tag" | ":tag:" | "yaml-bare" | ||
---@field command_palette_theme "dropdown" | "ivy" | ||
---@field show_tags_theme string | ||
---@field template_handling "smart" | "prefer_new_note" | "always_ask" | ||
---@field new_note_location "smart" |"prefer_home" | "same_as_current" | ||
---@field rename_update_links boolean | ||
---@field media_previewer "telescope-media-files" | "catimg-previewer" | "viu-previewer" | ||
---@field media_extensions MediaExtensions[] | ||
---@field follow_url_fallback string|nil | ||
---@field enable_create_new boolean | ||
---@field clipboard_program string | ||
---@field filter_extensions string[] | ||
---@field template_new_note string|nil | ||
---@field template_new_daily string|nil | ||
---@field template_new_weekly string|nil | ||
---@field find_command string[] | ||
---@field rg_pcre boolean | ||
--- | ||
---For defaults, | ||
---@see Config.get_defaults | ||
local VaultConfig = {} | ||
|
||
---@alias WeekNumberFormat | ||
---| 1 # WK01 | ||
---| 2 # WK 1 | ||
---| 3 # KW01 | ||
---| 4 # KW 1 | ||
---| 5 # 1 | ||
|
||
---@alias CalendarStartDay | ||
---| 0 # weeks start on Sundays | ||
---| 1 # weeks start on Mondays | ||
|
||
---@alias CalendarMarkPosition | ||
---| 'left' # ugly | ||
---| 'right' # right to the day | ||
---| 'left-fit' # left of the day | ||
|
||
---@class CalendarOpts | ||
---@field weeknm WeekNumberFormat | ||
---@field calendar_monday CalendarStartDay | ||
---@field calendar_mark CalendarMarkPosition | ||
local CalendarOpts = {} | ||
|
||
---@class MultiVaultConfig | ||
---@field vaults table<string, VaultConfig> | ||
---@field default_vault? string | ||
local MultiVaultConfig = {} |