Code Monkey home page Code Monkey logo

denite-gtags's Introduction

denite-gtags

denite-gtags is a denite.nvim source for GNU Global

Requirements

  • GNU Global
  • denite.nvim

Installation

For dein.vim

call dein#add('ozelentok/denite-gtags')

Usage

denite-gtags implements the following sources for denite

  • gtags_def - Definition of tag
  • gtags_ref - References to tag
  • gtags_context - Definition/References to tag (based on current tag context)
  • gtags_grep - Grep search of tag
  • gtags_completion - List all tags
  • gtags_file - List all tags in file - (default is current file)
  • gtags_files - List all tags under current directory
  • gtags_path - List all paths in GTAGS file

Key Mapping

Map commands for easier usage

nnoremap <leader>a :DeniteCursorWord -buffer-name=gtags_context gtags_context<cr>
nnoremap <leader>d :DeniteCursorWord -buffer-name=gtags_def gtags_def<cr>
nnoremap <leader>r :DeniteCursorWord -buffer-name=gtags_ref gtags_ref<cr>
nnoremap <leader>g :DeniteCursorWord -buffer-name=gtags_grep gtags_grep<cr>
nnoremap <leader>t :Denite -buffer-name=gtags_completion gtags_completion<cr>
nnoremap <leader>f :Denite -buffer-name=gtags_file gtags_file<cr>
nnoremap <leader>F :Denite -buffer-name=gtags_files gtags_files<cr>
nnoremap <leader>p :Denite -buffer-name=gtags_path gtags_path<cr>

Dynamic Configuration

To set GTAGSROOT and GTAGSDBPATH dynamically, set the following variables per buffer

let b:denite_gtags_root='/path/to/project'
let b:denite_gtags_db_path='/path/to/gtags-db'

Examples

To jump to a tag definition, move the cursor to the tag, press <leader>d or execute the following command:

:DeniteCursorWord gtags_def

Alternatively, enter the tag as an argument

:Denite gtags_def:TAG

denite-gtags's People

Contributors

dsirov avatar impactaky avatar ozelentok avatar zhougy0717 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

denite-gtags's Issues

Not working jump to file.

Pressing enter on the file just new line without jump to the file. Any ideas?

bootstrap.rb [Git(master)]         
                                                                                                                                                                                                                  75,54          [ENC=utf-8]14%
Common/Logger.rb   13  class Logger

Logger  gtags_def(4/4)                                                                                                                                                                           [...] 1/1
:DeniteCursorWord -buffer-name=gtags_def gtags_def

denite-gtags doesn't work

After install , execute every denite-gtags command get the error following.

[denite] Traceback (most recent call last):
[denite] File "/Users/kai/.local/share/plugged/denite.nvim/rplugin/python3/denite/init.py", line 29, in start

[denite] return ui.start(args[0], args[1])
[denite] File "/Users/kai/.local/share/plugged/denite.nvim/rplugin/python3/denite/ui/default.py", line 68, in sta
rt
[denite] self._start(sources, context)
[denite] File "/Users/kai/.local/share/plugged/denite.nvim/rplugin/python3/denite/ui/default.py", line 111, in _s
tart
[denite] self.init_denite()
[denite] File "/Users/kai/.local/share/plugged/denite.nvim/rplugin/python3/denite/ui/default.py", line 608, in in
it_denite
[denite] self._denite.start(self._context)
[denite] File "/Users/kai/.local/share/plugged/denite.nvim/rplugin/python3/denite/denite.py", line 36, in start
[denite] self.load_filters(context)
[denite] File "/Users/kai/.local/share/plugged/denite.nvim/rplugin/python3/denite/denite.py", line 222, in load_f
ilters
[denite] 'denite.filter.' + name, path).load_module()
[denite] File "", line 399, in _check_name_wrapper
[denite] File "", line 823, in load_module
[denite] File "", line 682, in load_module
[denite] File "", line 251, in _load_module_shim
[denite] File "", line 675, in _load
[denite] File "", line 655, in _load_unlocked
[denite] File "", line 678, in exec_module
[denite] File "", line 205, in _call_with_frames_removed
[denite] File "/Users/kai/.config/nvim/plugged/denite.nvim/rplugin/python3/denite/filter/converter_relative_abbr.
py", line 8, in
[denite] from denite.util import relpath
[denite] ImportError: cannot import name 'relpath'
[denite] Please execute :messages command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.