From d2f0a4af6a2ac8e3b85bbcef23e1f6850ed99d23 Mon Sep 17 00:00:00 2001 From: hedy Date: Wed, 1 Nov 2023 14:39:49 +0800 Subject: [PATCH] Update readme --- README.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b4d9e09..a91b016 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,24 @@ Lazy: { desc = "SymbolsOutline" }) require("symbols-outline").setup { - -- Your setup opts here (optional) + -- Your setup opts here (leave empty to use defaults) + } + end, +}, +``` + +Lazy with lazy-loading: +```lua +{ + "simrat39/symbols-outline.nvim", + cmd = { "SymbolsOutline", "SymbolsOutlineOpen", "SymbolsOutlineClose" }, + keys = { "tt" }, + config = function() + -- Example mapping to toggle symbols-outline + vim.keymap.set("n", "tt", "SymbolsOutline", + { desc = "SymbolsOutline" }) + require("symbols-outline").setup { + -- Your setup opts here (leave empty to use defaults) } end, }, @@ -180,13 +197,13 @@ Lazy: ## Setup -Put the setup call in your init.lua or any lua file that is sourced. +Call the setup function with your configuration options. -**NOTE**: A call to `.setup()` is *required* for this plugin to work! -(simrat39/symbols-outline.nvim#213) +Note that a call to `.setup()` is *required* for this plugin to work +(simrat39/symbols-outline.nvim#213). ```lua -require("symbols-outline").setup() +require("symbols-outline").setup({}) ``` ## Configuration @@ -303,7 +320,7 @@ local opts = { ### Lua -``` +```lua require'symbols-outline'.toggle_outline() require'symbols-outline'.open_outline() require'symbols-outline'.close_outline()