From 08b7eb68809a94f60c8d31f15381c0afb15d38a5 Mon Sep 17 00:00:00 2001 From: Elflare <271374942@qq.com> Date: Sun, 6 Jul 2025 15:03:13 +0800 Subject: [PATCH] update doc --- doc/memos.nvim.txt | 58 +++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/doc/memos.nvim.txt b/doc/memos.nvim.txt index f908980..5323b3a 100644 --- a/doc/memos.nvim.txt +++ b/doc/memos.nvim.txt @@ -27,8 +27,8 @@ leaving Neovim. - *Create & Edit*: Create new memos or edit existing ones in a dedicated buffer with `markdown` filetype support. - *Delete Memos*: Delete memos directly from the list. -- *Lazy Loading*: The plugin is loaded only when you run one of its commands. - *Customizable*: Configure API endpoints, keymaps, and more. +- *First-time Setup*: On first launch, you will be prompted to enter your Memos host and token. You can choose to save these permanently. ============================================================================== 3. Installation *memos-installation* @@ -38,26 +38,34 @@ Requires |plenary.nvim|. Install with |lazy.nvim|: >lua -- lua/plugins/memos.lua -return { - "Elflare/memos.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - require("memos").setup({ - host = "", - token = "", - pageSize = 50, - keymaps = { - list = { - add_memo = "a", - -- ... other list keymaps - }, - buffer = { - save = "ms", -- Your desired save keymap - }, - }, - }) - end, -} +require("memos").setup({ + + -- Number of memos to fetch per page + pageSize = 50, + auto_save = false, + -- Set to false or nil to disable a keymap + keymaps = { + -- Keymap to open the memos list. Default: mm + start_memos = "mm", + + -- Keymaps for the memo list window + list = { + add_memo = "a", + delete_memo = "d", + delete_memo_visual = "dd", + edit_memo = "", + vsplit_edit_memo = "", + search_memos = "s", + refresh_list = "r", + next_page = ".", + quit = "q", + }, + -- Keymaps for the editing/creating buffer + buffer = { + save = "ms", + }, + }, +}) < ============================================================================== 4. Usage *memos-usage* @@ -106,13 +114,9 @@ function. Default configuration: >lua +-- lua/plugins/memos.lua require("memos").setup({ - -- REQUIRED: Your Memos host URL - host = "https://your-memos-host.com", - - -- REQUIRED: Your Memos API token (Open API) - token = "your-super-secret-token", - + auto_save = false, -- Number of memos to fetch per page pageSize = 50,