Search and view the cppreference manuals on the fly, in your favorite editor!
- View the manuals right inside the neovim.
- Search in all manuals on the fly. What you can expect from a vscode extension or a browser extension is now available in neovim!
Kkeymap support. In the manual you can pressKand jump to the manual for<cword>.- Open corresponding cppreference page in browser.
- NVIM >= 0.10.
- cppman
sqlite3, used to query the index database.
{
"v1nh1shungry/cppman.nvim",
cmd = "Cppman",
dependencies = {
"nvim-telescope/telescope.nvim", -- optional for telescope picker
"folke/snacks.nvim", -- optional for snacks picker
},
opts = {}, -- required, `setup()` must be called
}-- default
require('cppman').setup {
-- * builtin: `vim.ui.select()`
-- * telescope
-- * snacks (recommended)
picker = "builtin",
-- used in `vim.api.nvim_open_win`
win = {
split = "below",
style = "minimal",
},
}NOTE: $XDG_CACHE_HOME/cppman/index.db will be used if it exists, because this one is more likely to be the latest. When you run cppman -r, cppman will rebuild the index database and store it in $XDG_CACHE_HOME/cppman/index.db.
-
require('cppman').search(): Search in all manuals. Usetelescope.nvimif available, otherwise usevim.ui.select(). -
require('cppman').open(keyword, list_all?): find entries contain keyword, if there're multiple matches, the very first one will be picked. Setlist_allto true can list all matches.
:Cppman [keyword]: calling with no argument will act likesearch, otherwiseopen.
NOTE: builtin picker does not support any keymap.
| Keymap | Description |
|---|---|
<CR> |
Open manpage in nvim |
<C-o> |
Open corresponding cppreference page with default browser (vim.ui.open) |
