You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Papis has now various subcommands (e.g. "Papis reload")
- Keymaps run those commands
- Commands and keymaps are set by modules (rather than centrally)
Papis.nvim integrates with telescope to easily and quickly search one's bibliography. Open the picker and enter the title (or author, year, etc.) of the article you're looking for. Once you've found it, you can insert a citation, open attached files and notes, and edit the `info.yaml` file. When attempting to open a note where none exists, papis.nvim will ask to create a new one.
28
28
29
29
Commands:
30
-
-`:Telescope papis`: Opens the papis.nvim telescope picker
30
+
-`:Papis search`: Opens the papis.nvim telescope picker
31
31
32
32
With the picker open, the following (currently hardcoded) keymaps become available:
33
33
-`of` (normal) / `<c-o>f` (insert): Opens files attached to the entry
34
34
-`on` (normal) / `<c-o>n` (insert): Opens notes attached to the entry (asks for the creation of a new one if none exists)
35
35
-`e` (normal) / `c-e` (insert): Opens the `info.yaml` file
36
36
-`f` (normal) / `c-f` (insert): Insert a formatted reference
When editing `tags` in `info.yaml` files, papis.nvim will suggest tags found in the database. This module is implemented as a [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) source.
When the cursor is positioned over a citation key (e.g. `Kant1781Critique`), papis.nvim allows you to interact with the bibliography item referenced by it.
49
49
50
50
Commands:
51
-
-`:PapisShowPopup`: Opens a floating window with information about the entry
52
-
-`:PapisOpenFile`: Opens files attached to the entry
53
-
-`:PapisOpenNote`: Opens notes attached to the entry (asks for the creation of a new one if none exists)
54
-
-`:PapisEditEntry`: Opens the `info.yaml` file
51
+
-`:Papis at-cursor show-popup`: Opens a floating window with information about the entry
52
+
-`:Papis at-cursor open-file`: Opens files attached to the entry
53
+
-`:Papis at-cursor open-note`: Opens notes attached to the entry (asks for the creation of a new one if none exists)
54
+
-`:Papis at-cursor edit`: Opens the `info.yaml` file
When creating new notes (via `:Telescope papis` or `:PapisOpenNote`), papis.nvim can be set up to format the new note with a custom function. You can, for example, give the note a title that corresponds to the entry's title or provide it with a skeleton structure. Below, in the setup section, there's an example suitable for the `markdown` format.
60
+
When creating new notes (via `:Papis search` or `:Papis at-cursor open-note`), papis.nvim can be set up to format the new note with a custom function. You can, for example, give the note a title that corresponds to the entry's title or provide it with a skeleton structure. Below, in the setup section, there's an example suitable for the `markdown` format.
61
61
62
62
## The database
63
63
64
64
All of papis.nvim's features are made possible by a sqlite database that is created when the plugin is first started. This might take a while, so be patient. From then on, the database is automatically (and very quickly) updated whenever `info.yaml` files are added, changed, or deleted. The database is synchronised when papis.nvim is started and is then kept up-to-date continuously while at least one neovim instance with a running papis.nvim session exists.
65
65
66
-
Note that fiddling with the plugin's options can leave the database in a messy state. If strange errors appear, use `:PapisReInitData` to re-initialise the database.
66
+
Note that fiddling with the plugin's options can leave the database in a messy state. If strange errors appear, use `:Papis reload data` to re-initialise the database.
67
67
68
68
## Installation
69
69
@@ -160,7 +160,7 @@ The `flake.nix` provides an overlay that can be used to install `papis.nvim`. Wi
-- Enable commands (disabling this still allows you to call the relevant lua
248
-
-- functions directly)
249
-
enable_commands=true,
250
-
251
247
-- Whether to enable the file system event watcher. When disabled, the database
252
248
-- is only updated on startup.
253
249
enable_fs_watcher=true,
@@ -357,10 +353,10 @@ enable_icons = true,
357
353
},
358
354
},
359
355
360
-
-- Configuration of the cursor-actions module.
361
-
["cursor-actions"] = {
356
+
-- Configuration of the at-cursor module.
357
+
["at-cursor"] = {
362
358
363
-
-- The format of the popup shown on `:PapisShowPopup` (equivalent to points 1-3
359
+
-- The format of the popup shown on `:Papis at-cursor show-popup` (equivalent to points 1-3
364
360
-- of `preview_format`)
365
361
popup_format= {
366
362
{ "author", "%s", "PapisPopupAuthor" },
@@ -464,7 +460,7 @@ cmp.setup({
464
460
465
461
## Usage
466
462
467
-
Papis.nvim will start automatically according to the filetypes defined in `init_filetypes` (see the [setup section](#setup)). When first starting, papis.nvim will import some configuration values from Papis and save them in the database. If you update your Papis configuration, you should re-import the configuration into papis.nvim with `:PapisReInitConfig`.
463
+
Papis.nvim will start automatically according to the filetypes defined in `init_filetypes` (see the [setup section](#setup)). When first starting, papis.nvim will import some configuration values from Papis and save them in the database. If you update your Papis configuration, you should re-import the configuration into papis.nvim with `:Papis reload config`.
0 commit comments