update doc
This commit is contained in:
@@ -27,8 +27,8 @@ leaving Neovim.
|
|||||||
- *Create & Edit*: Create new memos or edit existing ones in a dedicated
|
- *Create & Edit*: Create new memos or edit existing ones in a dedicated
|
||||||
buffer with `markdown` filetype support.
|
buffer with `markdown` filetype support.
|
||||||
- *Delete Memos*: Delete memos directly from the list.
|
- *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.
|
- *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*
|
3. Installation *memos-installation*
|
||||||
@@ -38,26 +38,34 @@ Requires |plenary.nvim|.
|
|||||||
Install with |lazy.nvim|:
|
Install with |lazy.nvim|:
|
||||||
>lua
|
>lua
|
||||||
-- lua/plugins/memos.lua
|
-- lua/plugins/memos.lua
|
||||||
return {
|
require("memos").setup({
|
||||||
"Elflare/memos.nvim",
|
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
-- Number of memos to fetch per page
|
||||||
config = function()
|
pageSize = 50,
|
||||||
require("memos").setup({
|
auto_save = false,
|
||||||
host = "",
|
-- Set to false or nil to disable a keymap
|
||||||
token = "",
|
keymaps = {
|
||||||
pageSize = 50,
|
-- Keymap to open the memos list. Default: <leader>mm
|
||||||
keymaps = {
|
start_memos = "<leader>mm",
|
||||||
list = {
|
|
||||||
add_memo = "a",
|
-- Keymaps for the memo list window
|
||||||
-- ... other list keymaps
|
list = {
|
||||||
},
|
add_memo = "a",
|
||||||
buffer = {
|
delete_memo = "d",
|
||||||
save = "<leader>ms", -- Your desired save keymap
|
delete_memo_visual = "dd",
|
||||||
},
|
edit_memo = "<CR>",
|
||||||
},
|
vsplit_edit_memo = "<Tab>",
|
||||||
})
|
search_memos = "s",
|
||||||
end,
|
refresh_list = "r",
|
||||||
}
|
next_page = ".",
|
||||||
|
quit = "q",
|
||||||
|
},
|
||||||
|
-- Keymaps for the editing/creating buffer
|
||||||
|
buffer = {
|
||||||
|
save = "<leader>ms",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
<
|
<
|
||||||
==============================================================================
|
==============================================================================
|
||||||
4. Usage *memos-usage*
|
4. Usage *memos-usage*
|
||||||
@@ -106,13 +114,9 @@ function.
|
|||||||
|
|
||||||
Default configuration:
|
Default configuration:
|
||||||
>lua
|
>lua
|
||||||
|
-- lua/plugins/memos.lua
|
||||||
require("memos").setup({
|
require("memos").setup({
|
||||||
-- REQUIRED: Your Memos host URL
|
auto_save = false,
|
||||||
host = "https://your-memos-host.com",
|
|
||||||
|
|
||||||
-- REQUIRED: Your Memos API token (Open API)
|
|
||||||
token = "your-super-secret-token",
|
|
||||||
|
|
||||||
-- Number of memos to fetch per page
|
-- Number of memos to fetch per page
|
||||||
pageSize = 50,
|
pageSize = 50,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user