1
0
silverbullet/packages/plugs/core/core.plug.yaml

224 lines
4.9 KiB
YAML

name: core
syntax:
Hashtag:
firstCharacters:
- "#"
regex: "#[^#\\s]+"
styles:
color: blue
NakedURL:
firstCharacters:
- "h"
regex: "https?:\\/\\/[-a-zA-Z0-9@:%._\\+~#=]{1,256}([-a-zA-Z0-9()@:%_\\+.~#?&=\\/]*)"
styles:
color: "#0330cb"
textDecoration: underline
cursor: pointer
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
reindexSpaceCommand:
path: "./page.ts:reindexCommand"
command:
name: "Space: Reindex"
reindexSpace:
path: "./page.ts:reindexSpace"
env: server
deletePage:
path: "./page.ts:deletePage"
command:
name: "Page: Delete"
# Backlinks
indexLinks:
path: "./page.ts:indexLinks"
events:
- page:index
linkQueryProvider:
path: ./page.ts:linkQueryProvider
events:
- query:link
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
# Navigation
linkNavigate:
path: "./navigate.ts:linkNavigate"
command:
name: Navigate To page
key: Ctrl-Enter
mac: Cmd-Enter
clickNavigate:
path: "./navigate.ts:clickNavigate"
events:
- page:click
navigateHome:
path: "./navigate.ts:navigateCommand"
command:
name: "Navigate: Home"
key: "Alt-h"
page: "index"
# Hashtags
indexTags:
path: "./tags.ts:indexTags"
events:
- page:index
tagComplete:
path: "./tags.ts:tagComplete"
events:
- page:complete
# Full text search
searchIndex:
path: ./search.ts:index
events:
- page:index
searchUnindex:
path: "./search.ts:unindex"
env: server
events:
- page:deleted
searchQueryProvider:
path: ./search.ts:queryProvider
events:
- query:full-text
searchCommand:
path: ./search.ts:searchCommand
command:
name: "Search Space"
key: Ctrl-Shift-f
mac: Cmd-Shift-f
readPageSearch:
path: ./search.ts:readPageSearch
pageNamespace:
pattern: "@search/.+"
operation: readPage
getPageMetaSearch:
path: ./search.ts:getPageMetaSearch
pageNamespace:
pattern: "@search/.+"
operation: getPageMeta
# Template commands
insertPageMeta:
path: "./page.ts:insertPageMeta"
slashCommand:
name: meta
quickNoteCommand:
path: ./template.ts:quickNoteCommand
command:
name: "Template: Quick Note"
key: "Alt-Shift-n"
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"
insertToday:
path: "./dates.ts:insertToday"
slashCommand:
name: today
insertTomorrow:
path: "./dates.ts:insertTomorrow"
slashCommand:
name: tomorrow
# Text editing commands
quoteSelection:
path: ./text.ts:quoteSelection
command:
name: "Text: Quote Selection"
key: "Ctrl->"
mac: "Cmd-Shift-."
listifySelection:
path: ./text.ts:listifySelection
command:
name: "Text: Listify Selection"
numberListifySelection:
path: ./text.ts:numberListifySelection
command:
name: "Text: Number Listify Selection"
bold:
path: ./text.ts:boldCommand
command:
name: "Text: Bold"
key: "Ctrl-b"
mac: "Cmd-b"
italic:
path: ./text.ts:italicCommand
command:
name: "Text: Italic"
key: "Ctrl-i"
mac: "Cmd-i"
# Plug manager
updatePlugsCommand:
path: ./plugmanager.ts:updatePlugsCommand
command:
name: "Plugs: Update"
key: "Ctrl-Shift-p"
mac: "Cmd-Shift-p"
updatePlugs:
path: ./plugmanager.ts:updatePlugs
env: server
getPlugHTTPS:
path: "./plugmanager.ts:getPlugHTTPS"
events:
- get-plug:https
getPlugGithub:
path: "./plugmanager.ts:getPlugGithub"
events:
- get-plug:github
# Debug commands
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"