ctags: initial auto fonction documentation support

This commit is contained in:
Maxime Coste 2013-01-30 00:23:58 +01:00
parent 00a9cdfc90
commit e278196e99

View File

@ -24,3 +24,24 @@ def -shell-params \
fi fi
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
}