A telescope.nvim extension for Manix
A fast documentation searcher for Nix
- Neovim >= 0.9
- Depends on Manix.
- telescope.nvim
Note
- This plugin may work with older Neovim versions, but is only tested with the latest stable version and nightly.
Using rocks.nvim:
:Rocks install telescope-manix
Using lazy.nvim:
{
'nvim-telescope/telescope.nvim',
branch = '0.1.x', -- Recommended
dependencies = {
'nvim-lua/plenary.nvim',
'mrcjkb/telescope-manix',
-- ...
},
}
Add the following to your telescope config:
local telescope = require('telescope')
telescope.setup {
-- opts...
}
telescope.load_extension('manix')
:Telescope manix
require('telescope-manix').search()
-- or
require('telescope').extensions.manix.manix()
default_opts = {
-- CLI arguments to pass to manix, see `manix --help`
-- for example: `{'--source', 'nixpkgs_doc', '--source', 'nixpkgs_comments'}`
-- will restrict search to nixpkgs docs and comments.
manix_args = {},
-- Set to true to search for the word under the cursor
cword = false,
}
require('telescope-manix').search(default_opts)
-- or
require('telescope').extensions.manix.manix(default_opts)
If you are not seeing any search results,
you may need to run manix --update-cache <query>
, to initialise the cache.