Skip to content

sgruszka/cscope-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

cscope-picker

Minimal telescope.nvim extension for cscope.

Expect cscope database is present in current working directory. Search for word under cursor.

Supports:

  • all references to a symbol
  • global definitions
  • functions called by a function
  • functions calling a function

For full-featured cscope plugin see cscope_maps.nvim

Installation

Use your favorite plugin manager, example for lazy.nvim:

 {
    'sgruszka/cscope-picker',
     dependencies = {
      'nvim-telescope/telescope.nvim',
     }
 }

Add to your init.lua file:

require('telescope').load_extension('cscope')

Available commands

Telescope cscope references
Telescope cscope definitions
Telescope cscope called_by_this_function
Telescope cscope calling_this_function

Example key bindings configuration

vim.keymap.set('n', '<C-\\>d', require('telescope').extensions.cscope.definitions, { desc = 'Cscope Definitions' })
vim.keymap.set('n', '<C-\\>r', require('telescope').extensions.cscope.references, { desc = 'Cscope References' })
vim.keymap.set('n', "<C-\\>c", require('telescope').extensions.cscope.calling_this_function, { desc = 'Cscope calls to this function' })
vim.keymap.set('n', '<C-\\>f', require('telescope').extensions.cscope.called_by_this_function, { desc = 'Cscope funnction calls by this function' })

About

Cscope picker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages