diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-01-30 00:23:58 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-01-30 00:24:10 +0100 |
| commit | e278196e99a46f78b034557aa5dfbefcdfebccd3 (patch) | |
| tree | 966107ae74ec4590d563b94381f3e79800a5601d /src | |
| parent | 00a9cdfc908651c7cc6483b1549c6b9617e2a75d (diff) | |
ctags: initial auto fonction documentation support
Diffstat (limited to 'src')
| -rw-r--r-- | src/rc/ctags.kak | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/rc/ctags.kak b/src/rc/ctags.kak index 13e2c1cc..badf4e98 100644 --- a/src/rc/ctags.kak +++ b/src/rc/ctags.kak @@ -24,3 +24,24 @@ def -shell-params \ fi fi }} + +def funcinfo %{ + eval -restore-selections %{ + exec [(<space>B; + %sh{ + if [[ "$kak_selection" =~ [a-zA-Z_]+\( ]]; then + sigs=$(readtags -e ${kak_selection%(} | grep kind:function | sed -e s/^.*signature://) + if [[ -n "$sigs" ]]; then + echo "info -anchor right '$sigs'" + exit + fi + fi + echo info + } + } +} + +hook global WinSetOption filetype=cpp %{ + hook window NormalIdle .* funcinfo + hook window InsertIdle .* funcinfo +} |
