name: core
syntax:
  HashTag:
    firstCharacters:
      - "#"
    regex: "#[A-Za-z\\.]+"
    styles:
      color: blue
  AtMention:
    firstCharacters:
      - "@"
    regex: "@[A-Za-z\\.]+"
    styles:
      color: blue
  NakedURL:
    firstCharacters:
      - "h"
    regex: "https?:\\/\\/[-a-zA-Z0-9@:%._\\+~#=]{1,256}([-a-zA-Z0-9()@:%_\\+.~#?&=\\/]*)"
    styles:
      color: "#0330cb"
      textDecoration: underline
functions:
  clearPageIndex:
    path: "./page.ts:clearPageIndex"
    env: server
    events:
      - page:saved
      - page:deleted
  pageQueryProvider:
    path: ./page.ts:pageQueryProvider
    events:
      - query:page
  parseIndexTextRepublish:
    path: "./page.ts:parseIndexTextRepublish"
    events:
      - page:index_text
  indexLinks:
    path: "./page.ts:indexLinks"
    events:
      - page:index
  linkQueryProvider:
    path: ./page.ts:linkQueryProvider
    events:
      - query:link
  # indexItems:
  #   path: "./item.ts:indexItems"
  #   events:
  #     - page:index
  # itemQueryProvider:
  #   path: ./item.ts:queryProvider
  #   events:
  #     - query:item
  deletePage:
    path: "./page.ts:deletePage"
    command:
      name: "Page: Delete"
  reindexSpaceCommand:
    path: "./page.ts:reindexCommand"
    command:
      name: "Space: Reindex"
  reindexSpace:
    path: "./page.ts:reindexSpace"
    env: server
  renamePage:
    path: "./page.ts:renamePage"
    command:
      name: "Page: Rename"
      mac: Cmd-Alt-r
      key: Ctrl-Alt-r
  pageComplete:
    path: "./page.ts:pageComplete"
    events:
      - page:complete
  linkNavigate:
    path: "./navigate.ts:linkNavigate"
    command:
      name: Navigate To page
      key: Ctrl-Enter
      mac: Cmd-Enter
  clickNavigate:
    path: "./navigate.ts:clickNavigate"
    events:
      - page:click
  insertToday:
    path: "./dates.ts:insertToday"
    slashCommand:
      name: today
  insertTomorrow:
    path: "./dates.ts:insertTomorrow"
    slashCommand:
      name: tomorrow
  parseServerCommand:
    path: ./debug.ts:parseServerPageCommand
    command:
      name: "Debug: Parse Document on Server"
  parsePage:
    path: ./debug.ts:parsePage
  parseCommand:
    path: ./debug.ts:parsePageCommand
    command:
      name: "Debug: Parse Document"
  showLogsCommand:
    path: ./debug.ts:showLogsCommand
    command:
      name: "Debug: Show Logs"
      key: "Ctrl-Alt-l"
      mac: "Cmd-Alt-l"
    events:
      - log:reload
  hideBhsCommand:
    path: ./debug.ts:hideBhsCommand
    command:
      name: "UI: Hide BHS"
      key: "Ctrl-Alt-b"
      mac: "Cmd-Alt-b"
  insertPageMeta:
    path: "./page.ts:insertPageMeta"
    slashCommand:
      name: meta
  quickNoteCommand:
    path: ./template.ts:quickNoteCommand
    command:
      name: "Template: Quick Note"
      key: "Alt-Shift-n"
      button:
        label: "🗒"
  quickTaskCommand:
    path: ./template.ts:quickTaskCommand
    command:
      name: "Template: Quick Task"
      key: "Alt-Shift-t"
  instantiateTemplateCommand:
    path: ./template.ts:instantiateTemplateCommand
    command:
      name: "Template: Instantiate for Page"
