Skip to content

Display and navigate easily the public interface of your modules

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

86 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. demo.gif

Installation

Using lazy.nvim

{
  'markelca/clapi.nvim',
  -- Dev Mode (Clone the repo, update the `dir` value and uncomment the two lines below)
  -- dir = '~/<dir-where-you-cloned>/clapi.nvim/',
  -- name = 'clapi',
  dependencies = {
    'nvim-telescope/telescope.nvim',
    'nvim-treesitter/nvim-treesitter',
    'nvim-lua/plenary.nvim',
  },
  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

Display and navigate easily the public interface of your modules

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published