after a reload i realized that i solved the keyboard mapping, but broke everything else in my config. where am i supposed to put those custom commands?
This is how my config.md looked like, but had to remove the command.update parts because nothing else worked - all the plugins and custom buttons disappeared
config.set {
plugs = {
"github:joekrill/silverbullet-treeview/treeview.plug.js",
"github:silverbulletmd/silverbullet-git/git.plug.js",
"github:minusInfinite/outline-sidebar/outline-sidebar.plug.js",
"github:jim-fx/silverbullet-excalidraw/excalidraw.plug.js",
"ghr:MrMugame/silversearch",
"github:silverbulletmd/silverbullet-mermaid/mermaid.plug.js"
-- Then run the `Plugs: Update` command to update them
},
-- The treeview plug configuration
treeview = {
-- Determines where the panel is displayed:
-- - "lhs" - left hand side
-- - "rhs" - right hand side
-- - "bhs" - bottom
-- - "modal" - in a modal
position = "lhs",
-- Must be > 0.
-- position = "lhs" | "rhs": determines the width of the panel.
-- position = "modal": sets the margin around the modal window.
-- position = "bhs": No effect
size=0.5,
dragAndDrop = {
-- Set to false to disable drag-and-drop
enabled = true,
-- Set to false to disable the confirmation prompt shown when dragging and
-- dropping pages that causes them to be renamed/moved.
confirmOnRename = true
},
-- An array of exclusion rules that will exclude pages from being
-- displayed in the sidebar.
exclusions = {
{
-- Filter by regular expression:
type = "regex",
-- Regular Expression string to exclude pages from the tree
-- Examples:
-- - Any page that is all-caps: "^[A-Z]+$"
-- - A specific set of pages: "^(?:CONFIG|Library|index).*$"
-- - Any path containing Hidden (e.g. test/Hidden/page1): "Hidden"
rule="^(?:CONFIG|SETTINGS|Library|index).*$",
-- Optional: set to true to negate the rule, only showing pages that match this regex.
negate= false,
},
{
-- Filter by page tags:
type = "tags",
tags = {"meta"},
-- Optional: set to true to negate the rule, only showing pages that include any of the tags.
negate = false
}
}
},
command.update {
name = "Navigate: Page Picker",
key = "Ctrl-o",
mac = "Cmd-o"
},
command.update {
name = "Navigate: Document Picker",
key = nil,
mac = nil
},
command.update {
name = "Open Command Palette",
key = "Ctrl-p",
mac = "Cmd-p"
},
actionButtons = {
{
icon = "sidebar",
description = "Toggle Tree View",
priority = 4,
run = function()
editor.invokeCommand("Tree View: Toggle")
end
},
{
icon = "search",
description = "Search",
priority = 4,
run = function()
editor.invokeCommand("Search Space")
end
},
{
icon = "pen-tool",
description = "Excalidraw",
priority = 4,
run = function()
editor.invokeCommand("Excalidraw: Create diagram")
end
},
{
icon = "home",
description = "Go to the index page",
priority = 3,
run = function()
editor.invokeCommand("Navigate: Home")
end
},
{
icon = "book",
description = "Open page",
priority = 2,
run = function()
editor.invokeCommand("Navigate: Page Picker")
end
},
{
icon = "terminal",
description = "Run command",
priority = 1,
run = function()
editor.invokeCommand "Open Command Palette"
end,
}
},
}