The telescope.nvim pickers to show document symbols don't include the items' visibility modifiers. This extension provides a picker including them, so you can display and navigate the class/module interface easily.
Using lazy.nvim
{
'markelca/clapi.nvim',
-- Dev Mode (Uncomment the two lines below)
-- dir = '~/estudio/lua/clapi.nvim/',
-- name = 'clapi',
dependencies = {
'nvim-telescope/telescope.nvim',
'nvim-treesitter/nvim-treesitter',
},
config = function()
-- Enable the clapi extension adding the following line to your telescope configuration:
pcall(require('telescope').load_extension 'clapi')
-- Optionally you can set up a keymap to run the picker
vim.keymap.set('n', '<leader>sa', require('clapi').builtin, { desc = '[S]earch [A]pi' })
-- Configurations for the clapi picker
require('telescope').setup {
extensions = {
clapi = {},
},
}
end,
}
Full example in my nvim config repository: nvim
After installation, you can use the picker with:
:Telescope clapi
Or in Lua:
:lua require('clapi').builtin()