Skip to content

Commit

Permalink
add ctags function expl options (#202)
Browse files Browse the repository at this point in the history
* add ctags function expl options

* add doc of Lf_CtagsFuncOpts
  • Loading branch information
solomonwzs authored and Yggdroot committed Aug 23, 2018
1 parent 5a6e38c commit fd00819
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions autoload/leaderf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ call s:InitDict('g:Lf_PreviewResult', {
\})
call s:InitDict('g:Lf_NormalMap', {})
call s:InitVar('g:Lf_Extensions', {})
call s:InitDict('g:Lf_CtagsFuncOpts', {})

let s:Lf_CommandMap = {
\ '<C-A>': ['<C-A>'],
Expand Down
3 changes: 3 additions & 0 deletions autoload/leaderf/python/leaderf/functionExpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def __init__(self):
"rust": "--rust-kinds=fPM", # universal ctags
"ocaml": "--ocaml-kinds=mf", # universal ctags
}
ctags_opts = lfEval('g:Lf_CtagsFuncOpts')
for k, v in ctags_opts.items():
self._ctags_options[k] = v

def getContent(self, *args, **kwargs):
if "--all" in kwargs.get("arguments", {}): # all buffers
Expand Down
8 changes: 8 additions & 0 deletions doc/leaderf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,14 @@ g:Lf_Ctags *g:Lf_Ctags*
<
Default value is "ctags".

g:Lf_CtagsFuncOpts *g:Lf_CtagsFuncOpts*
Use this option to specify the options of ctags to generate the tags of
functions. e.g., >
let g:Lf_CtagsFuncOpts = {
\ 'c': '--c-kinds=fp',
\ 'rust': '--rust-kinds=f',
\ }
<
g:Lf_PreviewCode *g:Lf_PreviewCode*
Use this option to specify whether to show the preview of the code the tag
locates in when navigating the tags.
Expand Down

0 comments on commit fd00819

Please sign in to comment.