|
| 1 | +*archive.nvim.txt* Archive.nvim - Markdown note management with wikilinks |
| 2 | + |
| 3 | +Author: Hisam Fahri <https://github.com/hisamafahri> |
| 4 | +License: MIT License |
| 5 | + |
| 6 | +============================================================================== |
| 7 | +CONTENTS *archive-contents* |
| 8 | + |
| 9 | + 1. Introduction .......................... |archive-introduction| |
| 10 | + 2. Requirements .......................... |archive-requirements| |
| 11 | + 3. Installation .......................... |archive-installation| |
| 12 | + 4. Configuration ......................... |archive-configuration| |
| 13 | + 5. Commands .............................. |archive-commands| |
| 14 | + 6. Functions ............................. |archive-functions| |
| 15 | + 7. Usage ................................. |archive-usage| |
| 16 | + 8. Troubleshooting ....................... |archive-troubleshooting| |
| 17 | + |
| 18 | +============================================================================== |
| 19 | +1. INTRODUCTION *archive-introduction* |
| 20 | + |
| 21 | +Archive.nvim is a Neovim plugin for creating and managing markdown notes with |
| 22 | +wikilink support and intelligent autocomplete. Heavily inspired by The Archive |
| 23 | +app. |
| 24 | + |
| 25 | +Features: |
| 26 | +- Create timestamped markdown notes with unique IDs |
| 27 | +- Wikilink autocomplete with nvim-cmp integration |
| 28 | +- Navigate between notes using wikilinks ([[Note Title]]) and markdown |
| 29 | + syntax links ([text](url)) |
| 30 | +- Automatic note creation |
| 31 | +- Open URLs in default browser |
| 32 | + |
| 33 | +============================================================================== |
| 34 | +2. REQUIREMENTS *archive-requirements* |
| 35 | + |
| 36 | +- ripgrep (required for file searching) |
| 37 | +- nvim-cmp (optional, for autocomplete) |
| 38 | + |
| 39 | +============================================================================== |
| 40 | +3. INSTALLATION *archive-installation* |
| 41 | + |
| 42 | +Using vim-plug: > |
| 43 | + Plug 'hisamafahri/archive.nvim' |
| 44 | +< |
| 45 | + |
| 46 | +Using dein.vim: > |
| 47 | + call dein#add('hisamafahri/archive.nvim') |
| 48 | +< |
| 49 | + |
| 50 | +Using packer.nvim: > |
| 51 | + use 'hisamafahri/archive.nvim' |
| 52 | +< |
| 53 | + |
| 54 | +Using lazy.nvim: > |
| 55 | + { |
| 56 | + 'hisamafahri/archive.nvim', |
| 57 | + config = function() |
| 58 | + require('archive').setup({ |
| 59 | + workspace = '~/notes' -- Required: path to your notes directory |
| 60 | + }) |
| 61 | + end |
| 62 | + } |
| 63 | +< |
| 64 | + |
| 65 | +============================================================================== |
| 66 | +4. CONFIGURATION *archive-configuration* |
| 67 | + |
| 68 | +Setup function: *archive.setup()* |
| 69 | + |
| 70 | + require('archive').setup({opts}) |
| 71 | + |
| 72 | +Parameters: ~ |
| 73 | + {opts} (table) Configuration options: |
| 74 | + - workspace (string): Required. Path to notes directory. |
| 75 | + |
| 76 | +Basic setup: > |
| 77 | + require('archive').setup({ |
| 78 | + workspace = '~/notes' -- Required: path to your notes directory |
| 79 | + }) |
| 80 | +< |
| 81 | + |
| 82 | +With nvim-cmp integration: > |
| 83 | + -- Setup archive.nvim |
| 84 | + require('archive').setup({ |
| 85 | + workspace = '~/notes' |
| 86 | + }) |
| 87 | + |
| 88 | + -- Add to your nvim-cmp sources |
| 89 | + require('cmp').setup({ |
| 90 | + sources = { |
| 91 | + { name = 'archive_wikilink' }, |
| 92 | + -- your other sources... |
| 93 | + } |
| 94 | + }) |
| 95 | +< |
| 96 | + |
| 97 | +============================================================================== |
| 98 | +5. COMMANDS *archive-commands* |
| 99 | + |
| 100 | +:Archive {subcommand} *:Archive* |
| 101 | + |
| 102 | +Available subcommands: |
| 103 | + |
| 104 | +:Archive new *:Archive-new* |
| 105 | + Create a new note with user input title. |
| 106 | + |
| 107 | +:Archive go_to_link *:Archive-go_to_link* |
| 108 | + Navigate to link under cursor. |
| 109 | + |
| 110 | +============================================================================== |
| 111 | +6. FUNCTIONS *archive-functions* |
| 112 | + |
| 113 | +archive.new() *archive.new()* |
| 114 | + Creates a new note with user input for the title. |
| 115 | + |
| 116 | +archive.go_to_link() *archive.go_to_link()* |
| 117 | + Navigates to the link under the cursor. |
| 118 | + |
| 119 | +archive.get_cmp_source() *archive.get_cmp_source()* |
| 120 | + Returns the nvim-cmp completion source for wikilink autocomplete. |
| 121 | + |
| 122 | +archive.setup({opts}) *archive.setup()* |
| 123 | + Initializes the plugin with the given configuration options. |
| 124 | + See |archive-configuration| for details. |
| 125 | + |
| 126 | +============================================================================== |
| 127 | +7. USAGE *archive-usage* |
| 128 | + |
| 129 | +Available Commands: ~ |
| 130 | + :Archive new - Create a new note with user input title |
| 131 | + :Archive go_to_link - Navigate to link under cursor |
| 132 | + |
| 133 | +Keybindings: ~ |
| 134 | + Add these to your Neovim configuration: > |
| 135 | + |
| 136 | + -- Create new note |
| 137 | + vim.keymap.set('n', '<leader>an', ':Archive new<CR>', |
| 138 | + { desc = 'Create new note' }) |
| 139 | + |
| 140 | + -- Navigate to link under cursor |
| 141 | + vim.keymap.set('n', '<leader>ag', ':Archive go_to_link<CR>', |
| 142 | + { desc = 'Go to link under cursor' }) |
| 143 | +< |
| 144 | + |
| 145 | +============================================================================== |
| 146 | +8. TROUBLESHOOTING *archive-troubleshooting* |
| 147 | + |
| 148 | +No autocomplete suggestions: ~ |
| 149 | +- Ensure ripgrep is installed and in PATH |
| 150 | +- Verify nvim-cmp is configured with archive_wikilink source |
| 151 | +- Check workspace path exists and contains .md files |
| 152 | + |
| 153 | +"No link found under cursor": ~ |
| 154 | +- Position cursor on link text, not brackets |
| 155 | +- Verify link syntax is correct |
| 156 | + |
| 157 | +File not found when following wikilinks: ~ |
| 158 | +- Verify workspace path is correct |
| 159 | +- Ensure markdown files exist in workspace |
| 160 | + |
| 161 | +============================================================================== |
| 162 | +vim:tw=78:ts=8:ft=help:norl: |
0 commit comments