Skip to content

A telescope.nvim extension that reveals a module's public interface

Notifications You must be signed in to change notification settings

MarkelCA/clapi.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

clapi.nvim

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. image

Installation

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

Usage

After installation, you can use the picker with:

:Telescope clapi

Or in Lua:

:lua require('clapi').builtin()

About

A telescope.nvim extension that reveals a module's public interface

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published